2022-12-15 03:36:12 +00:00
|
|
|
# MANUAL: I had to run `sudo service local_unbound setup`
|
2022-10-14 05:29:40 +00:00
|
|
|
- name: Install configuration
|
|
|
|
copy:
|
|
|
|
src: "files/{{ item.src }}"
|
|
|
|
dest: "{{ item.dest }}"
|
|
|
|
mode: 0644
|
|
|
|
owner: root
|
|
|
|
group: wheel
|
|
|
|
when: network_rc is defined
|
|
|
|
loop:
|
|
|
|
- src: "{{ network_rc }}"
|
|
|
|
dest: /etc/rc.conf.d/network
|
|
|
|
|
2023-05-28 18:22:49 +00:00
|
|
|
- name: Install configuration
|
|
|
|
copy:
|
|
|
|
src: "files/{{ item.src }}"
|
|
|
|
dest: "{{ item.dest }}"
|
|
|
|
mode: 0644
|
|
|
|
owner: root
|
|
|
|
group: wheel
|
|
|
|
when: routing_rc is defined
|
|
|
|
loop:
|
|
|
|
- src: "{{ routing_rc }}"
|
|
|
|
dest: /etc/rc.conf.d/routing
|
|
|
|
|
2022-10-14 05:29:40 +00:00
|
|
|
- name: Install configuration
|
|
|
|
copy:
|
|
|
|
src: "files/{{ item.src }}"
|
|
|
|
dest: "{{ item.dest }}"
|
|
|
|
mode: 0644
|
|
|
|
owner: root
|
|
|
|
group: wheel
|
|
|
|
when: rtsold_rc is defined
|
|
|
|
loop:
|
|
|
|
- src: "{{ rtsold_rc }}"
|
|
|
|
dest: /etc/rc.conf.d/rtsold
|
|
|
|
|
|
|
|
- name: Configure sysctls
|
|
|
|
sysctl:
|
|
|
|
name: "{{ item.name }}"
|
|
|
|
value: "{{ item.value }}"
|
|
|
|
state: present
|
2024-09-29 07:52:00 +00:00
|
|
|
reload: false
|
2022-10-14 05:29:40 +00:00
|
|
|
sysctl_file: "/etc/sysctl.conf.local"
|
|
|
|
loop:
|
2024-07-04 05:31:07 +00:00
|
|
|
- name: net.inet6.ip6.use_tempaddr # Enable privacy addresses
|
|
|
|
value: "1"
|
|
|
|
- name: net.inet6.ip6.prefer_tempaddr # Prefer privacy addresses
|
|
|
|
value: "1"
|
2022-12-15 03:36:12 +00:00
|
|
|
|
|
|
|
- name: Install service configuration
|
|
|
|
copy:
|
|
|
|
src: "files/{{ item }}_rc.conf"
|
|
|
|
dest: "/etc/rc.conf.d/{{ item }}"
|
|
|
|
mode: 0644
|
|
|
|
owner: root
|
|
|
|
group: wheel
|
|
|
|
loop:
|
|
|
|
- local_unbound
|
2024-07-12 23:58:50 +00:00
|
|
|
|
|
|
|
- name: Prefer ipv6
|
|
|
|
when: prefer_ipv6
|
2024-07-13 01:44:43 +00:00
|
|
|
blockinfile:
|
|
|
|
path: "/etc/rc.conf.d/ip6addrctl"
|
|
|
|
marker: "# {mark} ANSIBLE MANAGED BLOCK"
|
|
|
|
create: true
|
|
|
|
mode: 0600
|
|
|
|
owner: root
|
|
|
|
group: wheel
|
|
|
|
block: |
|
|
|
|
ip6addrctl_policy="ipv6_prefer"
|
2024-07-12 23:58:50 +00:00
|
|
|
|
|
|
|
- name: Don't Prefer ipv6
|
|
|
|
when: not prefer_ipv6
|
|
|
|
file:
|
|
|
|
path: "/etc/rc.conf.d/ip6addrctl"
|
|
|
|
state: absent
|