summaryrefslogtreecommitdiffstats
path: root/roles/common/tasks/firewall.yml
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2013-10-31 03:25:01 +0100
committerGuilhem Moulin <guilhem@fripost.org>2015-06-07 02:50:32 +0200
commit662120af880623fd0ba16b83cd80320e1a3806cc (patch)
tree4326f497b4a5659ae6199b8e3457028f000e2db4 /roles/common/tasks/firewall.yml
parentbda835d0051950c63c0f38bbf11fb6fe47b4af36 (diff)
Add a 'check' switch to the firewall.
update-firewall.sh -c does not update the firewall, but returns a non-zero value iff. running it without the switch would modify it.
Diffstat (limited to 'roles/common/tasks/firewall.yml')
-rw-r--r--roles/common/tasks/firewall.yml7
1 files changed, 5 insertions, 2 deletions
diff --git a/roles/common/tasks/firewall.yml b/roles/common/tasks/firewall.yml
index 2913a9e..d15384a 100644
--- a/roles/common/tasks/firewall.yml
+++ b/roles/common/tasks/firewall.yml
@@ -16,14 +16,17 @@
dest=/etc/iptables/services
owner=root group=root
mode=0600
- notify:
- - Unsafe firewall update
- name: Copy /usr/local/sbin/update-firewall.sh
copy: src=usr/local/sbin/update-firewall.sh
dest=/usr/local/sbin/update-firewall.sh
owner=root group=root
mode=0755
+
+- name: Ensure the firewall is up to date
+ command: /usr/local/sbin/update-firewall.sh -c
+ register: rv
+ changed_when: rv.rc
notify:
- Unsafe firewall update