roles: strict truthy values

According to Ansible we can use yes, true, True, "or any quoted st-
ring" for a boolean true, but ansible-lint wants us to use either
true or false.

See: https://chronicler.tech/red-hat-ansible-yes-no-and/
This commit is contained in:
2022-09-10 22:33:19 +03:00
parent 95d0005978
commit ffe7a872dd
25 changed files with 314 additions and 314 deletions

View File

@ -109,27 +109,27 @@
# need to reload to pick up service/timer/environment changes
- name: Reload systemd daemon
ansible.builtin.systemd: daemon_reload=yes
ansible.builtin.systemd: daemon_reload=true
when: spamhaus_firewalld_systemd_units is changed or
nftables_systemd_units is changed
- name: Start and enable Spamhaus firewalld update timer
when: ansible_distribution_version is version('18.04', '<=')
ansible.builtin.systemd: name=update-spamhaus-lists.timer state=started enabled=yes
ansible.builtin.systemd: name=update-spamhaus-lists.timer state=started enabled=true
notify:
- restart firewalld
- restart fail2ban
- name: Start and enable nftables update timers
when: ansible_distribution_version is version('20.04', '>=')
ansible.builtin.systemd: name={{ item }} state=started enabled=yes
ansible.builtin.systemd: name={{ item }} state=started enabled=true
loop:
- update-spamhaus-nftables.timer
- update-abusech-nftables.timer
- name: Start and enable nftables
when: ansible_distribution_version is version('20.04', '>=')
ansible.builtin.systemd: name=nftables state=started enabled=yes
ansible.builtin.systemd: name=nftables state=started enabled=true
- ansible.builtin.include_tasks: fail2ban.yml
when: ansible_distribution_version is version('16.04', '>=')