ctucx.git: ansible-configs

My personal ansible roles and playbooks [deprecated in favor of nixos]

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
38 
39 
40 
41 ---

- name: "[Sysctl] Enable IPv4 forwarding"
  ansible.posix.sysctl:
    name: net.ipv4.ip_forward
    value: '1'
    sysctl_file: /etc/sysctl.d/10-ip_forward.conf
    sysctl_set: yes
    state: present
    reload: yes
  when: network.ipForwarding is true

- name: "[Sysctl] Enable IPv6 forwarding"
  ansible.posix.sysctl:
    name: net.ipv6.conf.all.forwarding
    value: '1'
    sysctl_file: /etc/sysctl.d/10-ip_forward.conf
    sysctl_set: yes
    state: present
    reload: yes
  when: network.ipForwarding is true

- name: "[Sysctl] Disable IPv4 forwarding"
  ansible.posix.sysctl:
    name: net.ipv4.ip_forward
    value: '0'
    sysctl_file: /etc/sysctl.d/10-ip_forward.conf
    sysctl_set: yes
    state: present
    reload: yes
  when: network.ipForwarding is false

- name: "[Sysctl] Disable IPv6 forwarding"
  ansible.posix.sysctl:
    name: net.ipv6.conf.all.forwarding
    value: '0'
    sysctl_file: /etc/sysctl.d/10-ip_forward.conf
    sysctl_set: yes
    state: present
    reload: yes
  when: network.ipForwarding is false