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.
jenkins-master
Dustin 2018-03-28 19:27:39 -05:00
parent 51acc08d3c
commit c5e3c861ab
3 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,2 @@
[Unit]
After=network.service

View File

@ -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

View File

@ -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