37 lines
802 B
YAML
37 lines
802 B
YAML
|
---
|
||
|
- name: Disable NetworkManager
|
||
|
become: true
|
||
|
systemd:
|
||
|
name: "{{ item }}"
|
||
|
enabled: false
|
||
|
loop:
|
||
|
- NetworkManager
|
||
|
- NetworkManager-wait-online
|
||
|
|
||
|
- name: Enable systemd-networkd
|
||
|
become: true
|
||
|
systemd:
|
||
|
name: "{{ item }}"
|
||
|
enabled: true
|
||
|
loop:
|
||
|
- systemd-networkd
|
||
|
- systemd-resolved
|
||
|
- systemd-networkd-wait-online
|
||
|
|
||
|
- name: Symlink so systemd-resolved uses /etc/resolv.conf
|
||
|
become: true
|
||
|
file:
|
||
|
dest: /etc/resolv.conf
|
||
|
src: /run/systemd/resolve/resolv.conf
|
||
|
state: link
|
||
|
force: true
|
||
|
setype: net_conf_t
|
||
|
|
||
|
- name: Symlink so /etc/resolv.conf uses systemd
|
||
|
become: true
|
||
|
file:
|
||
|
dest: /etc/systemd/system/multi-user.target.wants/systemd-resolved.service
|
||
|
src: /usr/lib/systemd/system/systemd-resolved.service
|
||
|
state: link
|
||
|
force: true
|