diff options
| author | Ahmed Abdelhalim <[email protected]> | 2025-09-03 03:45:23 +0200 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2025-09-03 03:45:23 +0200 |
| commit | db73cdace9c30550902025db362530aec6982a9b (patch) | |
| tree | ed224d52dbdef666722b17a72c26eb1993781fb0 /roles/gateway/tasks | |
| parent | dc3b441981e40edca71ef067d553aa5b696d7777 (diff) | |
Revert "Experimental: adding iptables persistence through reboots"
This reverts commit 025abf3ce9497f51d21b14aa31907c0c3bd75ecf.
Diffstat (limited to 'roles/gateway/tasks')
| -rw-r--r-- | roles/gateway/tasks/main.yml | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/roles/gateway/tasks/main.yml b/roles/gateway/tasks/main.yml index e9bac4e0..f9ccd4cb 100644 --- a/roles/gateway/tasks/main.yml +++ b/roles/gateway/tasks/main.yml @@ -5,13 +5,6 @@ name: "iptables" state: "present" -- name: "Install iptables persistence (Debian only)" - become: true - ansible.builtin.package: - name: "iptables-persistent" - state: "present" - when: ansible_os_family == "Debian" - - name: "Configure IP forwarding" become: true ansible.builtin.blockinfile: @@ -117,43 +110,3 @@ comment: "Allow IPv6 established connections" ip_version: "ipv6" state: "{{ 'present' if gateway_enabled else 'absent' }}" - -- name: "Create iptables directory (Arch only)" - become: true - ansible.builtin.file: - path: "/etc/iptables" - state: "directory" - mode: "0755" - when: ansible_os_family == "Archlinux" - -- name: "Save iptables rules (Debian)" - become: true - ansible.builtin.command: - cmd: "netfilter-persistent save" - changed_when: true - # The saving of ip tables changes the host - # It's intentional to ignore this task for idempotency test - tags: - - molecule-idempotence-notest - when: ansible_os_family == "Debian" - -- name: "Save iptables rules (Arch)" - become: true - ansible.builtin.shell: - cmd: "iptables-save > /etc/iptables/iptables.rules && ip6tables-save > /etc/iptables/ip6tables.rules" - changed_when: true - # The saving of ip tables changes the host - # It's intentional to ignore this task for idempotency test - tags: - - molecule-idempotence-notest - when: ansible_os_family == "Archlinux" - -- name: "Enable iptables services (Arch only)" - become: true - ansible.builtin.systemd: - name: "{{ item }}" - enabled: true - with_items: - - "iptables" - - "ip6tables" - when: ansible_os_family == "Archlinux" |
