23 lines
821 B
YAML
23 lines
821 B
YAML
---
|
|
- name: Register proto proxy
|
|
ansible.builtin.lineinfile:
|
|
path: /etc/iproute2/rt_protos.d/proxy.conf
|
|
regexp: ^\d+ proxy$
|
|
line: "{{ service.proto_id }} {{ service.config.protocol }}"
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
|
|
- name: Enable IP forward and ARP and NDP proxies
|
|
ansible.posix.sysctl:
|
|
name: "{{ item.name }}"
|
|
value: "1"
|
|
sysctl_file: /etc/sysctl.d/{{ item.file }}.conf
|
|
sysctl_set: true
|
|
reload: true
|
|
loop:
|
|
- { name: net.ipv4.ip_forward, file: 10-forwarding }
|
|
- { name: net.ipv6.conf.all.forwarding, file: 10-forwarding }
|
|
- { name: "net.ipv4.conf.{{ service.main_interface }}.proxy_arp", file: "11-proxy-{{ service.main_interface }}" }
|
|
- { name: "net.ipv6.conf.{{ service.main_interface }}.proxy_ndp", file: "11-proxy-{{ service.main_interface }}" }
|