Skip to content

Commit

Permalink
fix: conditional statement jinja2 templating warning (#266)
Browse files Browse the repository at this point in the history
A new warning occurred after updating from ansible-core 2.15.4 to 2.15.8
[WARNING]: conditional statements should not include jinja2 templating
delimiters such as {{ }} or {% %}. Found: ...

Removed the jinja2 templating delimeters to fix the warning.

Signed-off-by: Ilari Iso-Junno <iisojunn@users.noreply.github.com>
Co-authored-by: Ilari Iso-Junno <iisojunn@users.noreply.github.com>
  • Loading branch information
iisojunn and iisojunn committed Dec 18, 2023
1 parent 214f7ed commit 172b4bb
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions roles/chrony_exporter/tasks/preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@
- name: Assert that TLS key and cert are present
ansible.builtin.assert:
that:
- "{{ __chrony_exporter_cert_file.stat.exists }}"
- "{{ __chrony_exporter_key_file.stat.exists }}"
- "__chrony_exporter_cert_file.stat.exists"
- "__chrony_exporter_key_file.stat.exists"

- name: Check if chrony_exporter is installed
ansible.builtin.stat:
Expand Down
4 changes: 2 additions & 2 deletions roles/memcached_exporter/tasks/preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
- name: Assert that TLS key and cert are present
ansible.builtin.assert:
that:
- "{{ __memcached_exporter_cert_file.stat.exists }}"
- "{{ __memcached_exporter_key_file.stat.exists }}"
- "__memcached_exporter_cert_file.stat.exists"
- "__memcached_exporter_key_file.stat.exists"

- name: Check if memcached_exporter is installed
ansible.builtin.stat:
Expand Down
4 changes: 2 additions & 2 deletions roles/mysqld_exporter/tasks/preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@
- name: Assert that TLS key and cert are present
ansible.builtin.assert:
that:
- "{{ __mysqld_exporter_cert_file.stat.exists }}"
- "{{ __mysqld_exporter_key_file.stat.exists }}"
- "__mysqld_exporter_cert_file.stat.exists"
- "__mysqld_exporter_key_file.stat.exists"

- name: Check if mysqld_exporter is installed
ansible.builtin.stat:
Expand Down
4 changes: 2 additions & 2 deletions roles/node_exporter/tasks/preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@
- name: Assert that TLS key and cert are present
ansible.builtin.assert:
that:
- "{{ __node_exporter_cert_file.stat.exists }}"
- "{{ __node_exporter_key_file.stat.exists }}"
- "__node_exporter_cert_file.stat.exists"
- "__node_exporter_key_file.stat.exists"

- name: Check if node_exporter is installed
ansible.builtin.stat:
Expand Down
4 changes: 2 additions & 2 deletions roles/pushgateway/tasks/preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
- name: Assert that TLS key and cert are present
ansible.builtin.assert:
that:
- "{{ __pushgateway_cert_file.stat.exists }}"
- "{{ __pushgateway_key_file.stat.exists }}"
- "__pushgateway_cert_file.stat.exists"
- "__pushgateway_key_file.stat.exists"

- name: Check if pushgateway is installed
ansible.builtin.stat:
Expand Down
4 changes: 2 additions & 2 deletions roles/smartctl_exporter/tasks/preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
- name: Assert that TLS key and cert are present
ansible.builtin.assert:
that:
- "{{ __smartctl_exporter_cert_file.stat.exists }}"
- "{{ __smartctl_exporter_key_file.stat.exists }}"
- "__smartctl_exporter_cert_file.stat.exists"
- "__smartctl_exporter_key_file.stat.exists"

- name: Check if smartctl_exporter is installed
ansible.builtin.stat:
Expand Down
4 changes: 2 additions & 2 deletions roles/smokeping_prober/tasks/preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
- name: Assert that TLS key and cert are present
ansible.builtin.assert:
that:
- "{{ __smokeping_prober_cert_file.stat.exists }}"
- "{{ __smokeping_prober_key_file.stat.exists }}"
- "__smokeping_prober_cert_file.stat.exists"
- "__smokeping_prober_key_file.stat.exists"

- name: Check if smokeping_prober is installed
ansible.builtin.stat:
Expand Down
4 changes: 2 additions & 2 deletions roles/systemd_exporter/tasks/preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
- name: Assert that TLS key and cert are present
ansible.builtin.assert:
that:
- "{{ __systemd_exporter_cert_file.stat.exists }}"
- "{{ __systemd_exporter_key_file.stat.exists }}"
- "__systemd_exporter_cert_file.stat.exists"
- "__systemd_exporter_key_file.stat.exists"

- name: Assert that systemd version is >= 235 when enabling ip accounting or measuring restart count
ansible.builtin.assert:
Expand Down

0 comments on commit 172b4bb

Please sign in to comment.