summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2025-09-10 15:31:19 +0200
committerGuilhem Moulin <guilhem@fripost.org>2025-09-10 15:31:19 +0200
commit831c41b79273d112367811331faab034e4d81cf1 (patch)
treed0d1cf82d836e33fc519f218be2b8110a964c007 /roles
parent4b48f1b6dd799d1a69f0c9e2a157a007fcdcbe25 (diff)
Convert changed_when value to a boolean.HEADmaster
As of ansible 2.19 a non-zero value is no longer converted to a boolean.
Diffstat (limited to 'roles')
-rw-r--r--roles/common/tasks/firewall.yml2
1 files changed, 1 insertions, 1 deletions
diff --git a/roles/common/tasks/firewall.yml b/roles/common/tasks/firewall.yml
index fd1ad92..30f4fa9 100644
--- a/roles/common/tasks/firewall.yml
+++ b/roles/common/tasks/firewall.yml
@@ -1,27 +1,27 @@
- name: Install nftables
apt: pkg=nftables
- name: Copy /usr/local/sbin/update-firewall
copy: src=usr/local/sbin/update-firewall
dest=/usr/local/sbin/update-firewall
owner=root group=staff
mode=0755
- name: Copy /etc/nftables.conf
template: src=etc/nftables.conf.j2
dest=/etc/nftables.conf
owner=root group=root
mode=0644
- name: Ensure the firewall is up to date
command: /usr/local/sbin/update-firewall -c
register: rv
# A non-zero return value will make ansible stop and show stderr. This
# is what we want.
- changed_when: rv.rc
+ changed_when: rv.rc != 0
- name: Enable nftables.service
service: name=nftables enabled=yes
- name: Start nftables.service
service: name=nftables state=started