--- - name: "enable ipv4 forwarding" ansible.posix.sysctl: name: "net.ipv4.ip_forward" value: "1" sysctl_file: "/etc/sysctl.d/local.conf" reload: true - name: "enable ipv6 forwarding" ansible.posix.sysctl: name: "net.ipv6.conf.all.forwarding" value: "1" sysctl_file: "/etc/sysctl.d/local.conf" reload: true - name: "keep ipv6 addresses on link down" ansible.posix.sysctl: name: "net.ipv6.conf.all.keep_addr_on_down" value: "1" sysctl_file: "/etc/sysctl.d/local.conf" reload: true - name: "create network directory hierarchy" ansible.builtin.file: path: "{{ system_etc_root_directory }}/{{ item }}" state: "directory" mode: 0755 loop: - "network" - "network/utils" - "network/interfaces" - name: "ifupdown script" ansible.builtin.template: src: "./ifupdown.sh" dest: "{{ system_etc_root_directory }}/network/utils/ifupdown.sh" mode: 0755 - name: "symlink ifupdown script to /etc/network" ansible.builtin.file: src: "{{ system_etc_root_directory }}/network/utils/ifupdown.sh" dest: "/etc/network/{{ item }}/the-nine-worlds" state: "link" loop: - "if-pre-up.d" - "if-up.d" - "if-down.d" - "if-post-down.d" - name: "ensure bridge-utils is not installed" ansible.builtin.apt: name: "bridge-utils" state: "absent" purge: true