X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=playbooks%2Fdebian%2Froles%2Ffirewall%2Ftasks%2Fmain.yml;h=0015e8162292b5522cd5ed68ab086b52746d25b4;hb=1d8e90526553fb429b5fb0f33c14e7917f8155a4;hp=02d5b206ed69e8195901b0db5b3a703461233deb;hpb=2f99edf4242d4378f68da2b4d77efb8aa33bd445;p=ansible.git diff --git a/playbooks/debian/roles/firewall/tasks/main.yml b/playbooks/debian/roles/firewall/tasks/main.yml index 02d5b20..0015e81 100644 --- a/playbooks/debian/roles/firewall/tasks/main.yml +++ b/playbooks/debian/roles/firewall/tasks/main.yml @@ -5,6 +5,7 @@ name: fail2ban state: latest update_cache: yes + register: fail2ban - name: Configure Debian firewall become: true @@ -15,13 +16,18 @@ group: root mode: '0750' force: no + register: etc - name: Fix permissions for /etc/network/functions become: true file: path: /etc/network/functions.phd mode: '0640' + register: functions - name: Start Debian firewall become: true - command: /etc/init.d/iptables.sh start + service: + name: iptables.sh + state: restarted + when: fail2ban.changed or etc.changed or functions.changed