common: Sync from polyfloyd

This commit is contained in:
polyfloyd 2022-10-08 20:03:33 +02:00
parent b1add6ce2c
commit 97a4e95ca8
4 changed files with 21 additions and 20 deletions

View file

@ -5,17 +5,14 @@
state: present
when: network_br
- lineinfile:
- name: Configure sysctl.conf
lineinfile:
path: /etc/sysctl.conf
regexp: ^#?net.ipv4.ip_forward
line: "net.ipv4.ip_forward=1 # Managed by Ansible"
notify: reboot
when: network_br
- lineinfile:
path: /etc/sysctl.conf
regexp: ^#?net.ipv6.conf.all.forwarding
line: "net.ipv6.conf.all.forwarding=1 # Managed by Ansible"
regexp: "^#?{{ item.k }}"
line: "{{ item.k }}={{ item.v }} # Managed by Ansible"
with_items:
- { k: net.ipv4.ip_forward, v: "1" }
- { k: net.ipv6.conf.all.forwarding, v: "1" }
notify: reboot
when: network_br