aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/network/tasks/main.yml
blob: ee2f21e946a888ec680ffefb0ec1b8611f964983 (plain) (blame)
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
- name: "Deploy iptablesv4 configuration"
  template: src=rules.v4.j2 dest=/etc/iptables/rules.v4
  notify:
    - reload iptables

- name: "Deploy iptablesv6 configuration"
  copy: src=rules.v6 dest=/etc/iptables/rules.v6
  notify:
    - reload ip6tables

- name: "Activate IP forwarding"
  sysctl:
    name: net.ipv4.ip_forward
    value: 1
    sysctl_set: yes

- name: "Flush handlers"
  meta: flush_handlers


# These two lines are used to undo previous config, remove them once it is done
- name: "Update nsswitch.conf to not use systemd-resolved"
  copy: src=nsswitch.conf dest=/etc/nsswitch.conf

- name: "Disable systemd-resolved"
  systemd:
    name: systemd-resolved
    state: stopped
    enabled: false