mesh-interfaces: fix networking.service to finally unfuck systemd start

ordering
This commit is contained in:
Markus 2018-02-06 13:56:22 +01:00
parent 9720f98384
commit cd4656fbaf
3 changed files with 26 additions and 0 deletions

View 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

View File

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

View File

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