Role server-basic: fix networking.service from ifupdown2 - some interfaces come up too late
This commit is contained in:
parent
95140f12ea
commit
bd52ad6dd7
2 changed files with 28 additions and 0 deletions
|
@ -67,3 +67,21 @@
|
||||||
mode: 0644
|
mode: 0644
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
|
|
||||||
|
- name: create systemd override dir for networking.service
|
||||||
|
file:
|
||||||
|
path: /etc/systemd/system/networking.service.d
|
||||||
|
state: directory
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0755
|
||||||
|
|
||||||
|
- name: configure systemd unit overrides
|
||||||
|
template:
|
||||||
|
src: networking_service_overrides.j2
|
||||||
|
dest: /etc/systemd/system/networking.service.d/override.conf
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0644
|
||||||
|
notify:
|
||||||
|
- reload systemd
|
||||||
|
|
10
roles/server-basic/templates/networking_service_overrides.j2
Normal file
10
roles/server-basic/templates/networking_service_overrides.j2
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
[Unit]
|
||||||
|
DefaultDependencies=no
|
||||||
|
Wants=network.target
|
||||||
|
After=local-fs.target network-pre.target apparmor.service systemd-sysctl.service systemd-modules-load.service
|
||||||
|
Before=network.target shutdown.target network-online.target
|
||||||
|
Conflicts=shutdown.target
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
WantedBy=network-online.target
|
Loading…
Reference in a new issue