roles/net-ifaces: Configure virtual net interfaces
The *net-ifaces* role manages a script that creates virtual network interfaces, such as bridge, bond, and VLAN, that `dhcpcd`/`dhclient` alone cannot. This provides a lightweight alternative to *systemd-networkd* and *NetworkMangager*.jenkins-master
parent
44a82688e4
commit
704850caa9
|
@ -0,0 +1,11 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Create virtual network interfaces
|
||||||
|
Before=network.target network-online.target dhcpcd.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=/usr/local/libexec/net-ifaces.sh
|
||||||
|
RemainAfterExit=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=network.target
|
|
@ -0,0 +1,2 @@
|
||||||
|
- name: reload systemd
|
||||||
|
command: systemctl daemon-reload
|
|
@ -0,0 +1,17 @@
|
||||||
|
- name: ensure net-ifaces script is installed
|
||||||
|
copy:
|
||||||
|
src={{ inventory_hostname }}.sh
|
||||||
|
dest=/usr/local/libexec/net-ifaces.sh
|
||||||
|
mode=0755
|
||||||
|
|
||||||
|
- name: ensure net-ifaces systemd unit is installed
|
||||||
|
copy:
|
||||||
|
src=net-ifaces.service
|
||||||
|
dest=/etc/systemd/system/net-ifaces.service
|
||||||
|
mode=0644
|
||||||
|
notify: reload systemd
|
||||||
|
|
||||||
|
- name: ensure net-ifaces service starts at boot
|
||||||
|
service:
|
||||||
|
name=net-ifaces
|
||||||
|
enabled=yes
|
Loading…
Reference in New Issue