-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
37 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
--- | ||
- include: vars.yml | ||
- include: rules.yml | ||
|
||
- include: persist-debian.yml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,27 @@ | ||
--- | ||
- name: Copy v4 save script | ||
template: src=save.v4.j2 dest=/etc/network/if-post-down.d/iptables-v4 owner=root group=root mode=755 | ||
- name: Remove any obsolete v4 save script | ||
file: path=/etc/network/if-post-down.d/iptables-v4 state=absent | ||
|
||
- name: Copy v4 restore script | ||
template: src=restore.v4.j2 dest=/etc/network/if-pre-up.d/iptables-v4 owner=root group=root mode=755 | ||
- name: Remove any obsolete v4 restore script | ||
file: path=/etc/network/if-pre-up.d/iptables-v4 state=absent | ||
|
||
- name: Remove any obsolete v4 saved rules | ||
file: path=/etc/iptables.v4.saved state=absent | ||
|
||
- name: Install iptables-persistent | ||
apt: name=iptables-persistent state=present | ||
|
||
- name: Check if netfilter-persistent is present | ||
shell: which netfilter-persistent | ||
register: is_netfilter | ||
when: v4_script|changed | ||
changed_when: false | ||
ignore_errors: yes | ||
|
||
- name: Save v4 rules (netfilter-persistent) | ||
command: netfilter-persistent save | ||
when: v4_script|changed and is_netfilter.rc == 0 | ||
|
||
- name: Save v4 rules (iptables-persistent) | ||
command: /etc/init.d/iptables-persistent save | ||
when: v4_script|changed and is_netfilter.rc == 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
- hosts: all | ||
sudo: true | ||
become: true | ||
|
||
roles: | ||
- role: . | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.