mesh-interfaces: fix networking.service to finally unfuck systemd start
ordering
This commit is contained in:
parent
9720f98384
commit
cd4656fbaf
17
roles/mesh-interfaces/files/networking.service
Normal file
17
roles/mesh-interfaces/files/networking.service
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=ifupdown2 networking initialization
|
||||||
|
Documentation=man:interfaces(5) man:ifup(8) man:ifdown(8)
|
||||||
|
Wants=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=yes
|
||||||
|
SyslogIdentifier=networking
|
||||||
|
TimeoutStopSec=30s
|
||||||
|
ExecStart=/usr/share/ifupdown2/sbin/start-networking start
|
||||||
|
ExecStop=/usr/share/ifupdown2/sbin/start-networking stop
|
||||||
|
ExecReload=/usr/share/ifupdown2/sbin/start-networking reload
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=basic.target network.target multi-user.target
|
||||||
|
WantedBy=network-online.target
|
@ -2,3 +2,6 @@
|
|||||||
|
|
||||||
- name: Reload interfaces
|
- name: Reload interfaces
|
||||||
command: /sbin/ifreload -a
|
command: /sbin/ifreload -a
|
||||||
|
|
||||||
|
- name: Reload systemd
|
||||||
|
command: systemctl daemon-reload
|
||||||
|
@ -9,6 +9,12 @@
|
|||||||
- name: Uninstall ifupdown
|
- name: Uninstall ifupdown
|
||||||
apt: name=ifupdown state=absent
|
apt: name=ifupdown state=absent
|
||||||
|
|
||||||
|
# this is required for nginx, dhcpd and other to start correctly
|
||||||
|
# see https://github.com/CumulusNetworks/ifupdown2/issues/30#issuecomment-360589850
|
||||||
|
- name: Install fixed networking.service file
|
||||||
|
copy: src=networking.service dest=/lib/systemd/system/networking.service
|
||||||
|
notify: Reload systemd
|
||||||
|
|
||||||
- name: Configure mesh interfaces
|
- name: Configure mesh interfaces
|
||||||
template: src=mesh.conf.j2 dest=/etc/network/interfaces.d/mesh.conf
|
template: src=mesh.conf.j2 dest=/etc/network/interfaces.d/mesh.conf
|
||||||
notify: Reload interfaces
|
notify: Reload interfaces
|
||||||
|
Loading…
Reference in New Issue
Block a user