ansible-roles/vpn/base/tasks/main.yml

55 lines
1.3 KiB
YAML
Raw Normal View History

2022-12-20 19:47:11 +01:00
---
- name: "enable ipv4 forwarding"
ansible.posix.sysctl:
name: "net.ipv4.ip_forward"
value: "1"
sysctl_file: "/etc/sysctl.d/local.conf"
reload: true
2023-07-25 00:01:49 +02:00
- name: "enable ipv6 forwarding"
ansible.posix.sysctl:
name: "net.ipv6.conf.all.forwarding"
value: "1"
sysctl_file: "/etc/sysctl.d/local.conf"
reload: true
2023-08-10 16:34:04 +02:00
- name: "keep ipv6 addresses on link down"
ansible.posix.sysctl:
name: "net.ipv6.conf.all.keep_addr_on_down"
value: "1"
sysctl_file: "/etc/sysctl.d/local.conf"
reload: true
- name: "create network directory hierarchy"
ansible.builtin.file:
path: "{{ system_etc_root_directory }}/{{ item }}"
state: "directory"
mode: 0755
loop:
- "network"
- "network/utils"
- "network/interfaces"
- name: "ifupdown script"
ansible.builtin.template:
src: "./ifupdown.sh"
dest: "{{ system_etc_root_directory }}/network/utils/ifupdown.sh"
mode: 0755
- name: "symlink ifupdown script to /etc/network"
ansible.builtin.file:
src: "{{ system_etc_root_directory }}/network/utils/ifupdown.sh"
dest: "/etc/network/{{ item }}/the-nine-worlds"
state: "link"
loop:
- "if-pre-up.d"
- "if-up.d"
- "if-down.d"
- "if-post-down.d"
- name: "ensure bridge-utils is not installed"
ansible.builtin.apt:
name: "bridge-utils"
state: "absent"
purge: true