summaryrefslogtreecommitdiff
path: root/roles/configure_iptables/tasks/main.yml
diff options
context:
space:
mode:
authorNiklas Yann Wettengel <niyawe@niyawe.de>2017-03-18 15:27:21 +0100
committerNiklas Yann Wettengel <niyawe@niyawe.de>2017-03-18 15:27:21 +0100
commit710a210ae6f165c2e3ce165d30d27f189311656b (patch)
treeb8c25058e1653b6b6088d7eda80956210f0e4acc /roles/configure_iptables/tasks/main.yml
parent0fbee3f86b0f92f55193556945b82d51cde6d5a7 (diff)
updated setup_fastd
added features: - configure_iptables
Diffstat (limited to 'roles/configure_iptables/tasks/main.yml')
-rw-r--r--roles/configure_iptables/tasks/main.yml26
1 files changed, 26 insertions, 0 deletions
diff --git a/roles/configure_iptables/tasks/main.yml b/roles/configure_iptables/tasks/main.yml
new file mode 100644
index 0000000..34f6c27
--- /dev/null
+++ b/roles/configure_iptables/tasks/main.yml
@@ -0,0 +1,26 @@
+---
+- name: copy iptables.rules
+ copy:
+ src: iptables.rules
+ dest: /etc/iptables/iptables.rules
+ register: iptables_rules
+
+- name: start and enable iptables service
+ when: iptables_rules.changed
+ systemd:
+ name: iptables.service
+ enabled: yes
+ state: reloaded
+
+- name: copy ip6tables.rules
+ copy:
+ src: ip6tables.rules
+ dest: /etc/iptables/ip6tables.rules
+ register: ip6tables_rules
+
+- name: start and enable ip6tables service
+ when: ip6tables_rules.changed
+ systemd:
+ name: ip6tables.service
+ enabled: yes
+ state: reloaded