Rename some roles to make ansible-lint happy.
This commit is contained in:
parent
4d791a65f1
commit
1db0b6ec31
75 changed files with 29 additions and 29 deletions
5
roles/networkdresolved/files/all-eth.network
Normal file
5
roles/networkdresolved/files/all-eth.network
Normal file
|
@ -0,0 +1,5 @@
|
|||
[Match]
|
||||
Name=e*
|
||||
|
||||
[Network]
|
||||
DHCP=yes
|
14
roles/networkdresolved/handlers/main.yml
Normal file
14
roles/networkdresolved/handlers/main.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
- name: restart and enable systemd-networkd
|
||||
systemd:
|
||||
name: systemd-networkd
|
||||
enabled: true
|
||||
state: restarted
|
||||
daemon_reload: true
|
||||
listen: "start and enable systemd-networkd"
|
||||
|
||||
- name: start and enable systemd-resolved
|
||||
systemd:
|
||||
name: systemd-resolved
|
||||
enabled: true
|
||||
state: started
|
||||
listen: "start and enable systemd-resolved"
|
26
roles/networkdresolved/tasks/main.yml
Normal file
26
roles/networkdresolved/tasks/main.yml
Normal file
|
@ -0,0 +1,26 @@
|
|||
- name: move /etc/network/interfaces away
|
||||
command:
|
||||
cmd: mv /etc/network/interfaces /etc/network/interfaces_orig
|
||||
creates: /etc/network/interfaces_orig
|
||||
|
||||
- name: switch to systemd-networkd
|
||||
copy:
|
||||
src: all-eth.network
|
||||
dest: /etc/systemd/network/all-eth.network
|
||||
mode: 0644
|
||||
notify: "start and enable systemd-networkd"
|
||||
|
||||
# - name: install static configuration for networkd
|
||||
# template:
|
||||
# src: 20-static.network.j2
|
||||
# dest: /etc/systemd/network/20-static.network
|
||||
# notify: "enable systemd-networkd"
|
||||
|
||||
- name: enable local stub resolver
|
||||
file:
|
||||
src: /run/systemd/resolve/stub-resolv.conf
|
||||
dest: /etc/resolv.conf
|
||||
state: link
|
||||
follow: false
|
||||
force: true
|
||||
notify: "start and enable systemd-resolved"
|
7
roles/networkdresolved/templates/20-static.network.j2
Normal file
7
roles/networkdresolved/templates/20-static.network.j2
Normal file
|
@ -0,0 +1,7 @@
|
|||
[Match]
|
||||
Name={{ if_lan }}
|
||||
|
||||
[Network]
|
||||
Address={{ ipaddr }}
|
||||
Gateway={{ gateway }}
|
||||
DNS={{ dns }}
|
Loading…
Add table
Add a link
Reference in a new issue