diff options
author | Dmitry Ilvokhin <d@ilvokhin.com> | 2024-06-01 19:12:52 +0100 |
---|---|---|
committer | Dmitry Ilvokhin <d@ilvokhin.com> | 2024-06-01 19:12:52 +0100 |
commit | c593b0c5ed0395c4fe31d074cfaf2e2657ae0856 (patch) | |
tree | 45cf6648a650f5dfa4ea3cc425f52f60ee22277f /roles/netfwd/tasks | |
parent | cf2d182f0a384e4eb95b0645e45b4491634e0441 (diff) | |
download | infra-c593b0c5ed0395c4fe31d074cfaf2e2657ae0856.tar.gz infra-c593b0c5ed0395c4fe31d074cfaf2e2657ae0856.tar.bz2 infra-c593b0c5ed0395c4fe31d074cfaf2e2657ae0856.zip |
Migrate netfwd to systemd-sysctl
/etc/sysctl.conf doesn't work, see [1]. Intrestingly enough, I catched
it only with system upgrade and reboot. Just reboot didn't catch it for
some reason, or I didn't notice.
[1]: https://wiki.archlinux.org/title/sysctl
Diffstat (limited to 'roles/netfwd/tasks')
-rw-r--r-- | roles/netfwd/tasks/main.yml | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/roles/netfwd/tasks/main.yml b/roles/netfwd/tasks/main.yml index 47e389a..3ba74ab 100644 --- a/roles/netfwd/tasks/main.yml +++ b/roles/netfwd/tasks/main.yml @@ -1,9 +1,9 @@ -- name: Configure IPv4 and IPv6 packet forwarding - ansible.builtin.sysctl: - name: '{{ item }}' - value: '1' - sysctl_set: true - loop: - - net.ipv4.ip_forward - - net.ipv4.conf.all.forwarding - - net.ipv6.conf.all.forwarding +- name: Configure IPv4 packet forwarding + ansible.builtin.copy: + src: files/99-net-ipv4-forward.conf + dest: /etc/sysctl.d/99-net-ipv4-forward.conf + owner: root + group: root + mode: u+rw,g+r,o+r + notify: + - Restart systemd-sysctl |