26 lines
695 B
YAML
26 lines
695 B
YAML
|
- name: Configure default interface name
|
||
|
ansible.builtin.template:
|
||
|
src: etc-systemd-network-10-lan0.link.j2
|
||
|
dest: /etc/systemd/network/10-lan0.link
|
||
|
mode: "0644"
|
||
|
register: systemd_networkd_ifname
|
||
|
|
||
|
- name: Configure network for default interface
|
||
|
ansible.builtin.template:
|
||
|
src: etc-systemd-network-20-lan0.network.j2
|
||
|
dest: /etc/systemd/network/20-lan0.network
|
||
|
mode: "0644"
|
||
|
notify: update initramfs
|
||
|
|
||
|
- name: Enable systemd-networkd
|
||
|
ansible.builtin.systemd_service:
|
||
|
name: systemd-networkd
|
||
|
enabled: true
|
||
|
state: restarted
|
||
|
|
||
|
- name: Enable systemd-resolved
|
||
|
ansible.builtin.systemd_service:
|
||
|
name: systemd-resolved
|
||
|
enabled: true
|
||
|
state: restarted
|