roles/dch-gw: Ensure dhcpcd starts after network
`dhcpcd` needs to start after the `network` service has started, as the latter creates the interfaces to which the former needs to delegate IPv6 prefixes.
This commit is contained in:
2
roles/dch-gw/files/dhcpcd-after-network.conf
Normal file
2
roles/dch-gw/files/dhcpcd-after-network.conf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
[Unit]
|
||||||
|
After=network.service
|
||||||
@@ -1,2 +1,4 @@
|
|||||||
|
- name: reload systemd
|
||||||
|
command: systemctl daemon-reload
|
||||||
- name: rebind dhcp leases
|
- name: rebind dhcp leases
|
||||||
command: dhcpcd -n
|
command: dhcpcd -n
|
||||||
|
|||||||
@@ -6,6 +6,18 @@
|
|||||||
notify: rebind dhcp leases
|
notify: rebind dhcp leases
|
||||||
- meta: flush_handlers
|
- meta: flush_handlers
|
||||||
|
|
||||||
|
- name: ensure dhcpcd unit extension directory exists
|
||||||
|
file:
|
||||||
|
path=/etc/systemd/system/dhcpcd.service.d/
|
||||||
|
mode=0755
|
||||||
|
state=directory
|
||||||
|
- name: ensure dhcpcd starts after network
|
||||||
|
copy:
|
||||||
|
src=dhcpcd-after-network.conf
|
||||||
|
dest=/etc/systemd/system/dhcpcd.service.d/after-network.conf
|
||||||
|
mode=0644
|
||||||
|
notify: reload systemd
|
||||||
|
|
||||||
- name: ensure ipv4 forwarding is enabled
|
- name: ensure ipv4 forwarding is enabled
|
||||||
sysctl:
|
sysctl:
|
||||||
name=net.ipv4.conf.all.forwarding
|
name=net.ipv4.conf.all.forwarding
|
||||||
|
|||||||
Reference in New Issue
Block a user