Purge iptables-persistent

This commit is contained in:
Alex Kotov 2020-02-13 18:29:34 +05:00
parent 7acfb0b025
commit 2df3aaaa35
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
2 changed files with 15 additions and 0 deletions

13
tasks/iptables/purge.yml Normal file
View File

@ -0,0 +1,13 @@
---
- name: Purge iptables-persistent
apt:
state: absent
purge: true
name:
- iptables-persistent
- netfilter-persistent
- name: Delete iptables-persistent configuration
file:
state: absent
path: '{{ common__iptables__conf_dir }}'

View File

@ -4,6 +4,8 @@
- include_tasks: ssh.yml
- meta: flush_handlers
- include_tasks: iptables/purge.yml
when common__iptables__state == 'purge'
- include_tasks: iptables/install.yml
when: common__iptables__state == 'install'
- meta: flush_handlers