3 - name: remove legacy systemd.link units
5 - 50-virtio-kernel-names.link
8 name: "/etc/systemd/network/{{ item }}"
11 - name: install systemd network link units
12 with_items: "{{ network.systemd_link.interfaces }}"
14 index_var: interface_index
17 dest: "/etc/systemd/network/{{ '%02d' | format(interface_index + 11) }}-{{ item.name }}.link"
18 notify: rebuild initramfs
20 when: network.systemd_link is defined
22 - name: install basic interface config
25 dest: /etc/network/interfaces
27 when: ansible_distribution == "Debian" or (ansible_distribution == "Ubuntu" and (ansible_distribution_major_version | int) < 18)
30 - name: remove default netplan config
32 path: /etc/netplan/01-netcfg.yaml
35 - name: install basic netplan config
38 dest: "/etc/netplan/01-{{ network.primary.interface }}.yaml"
41 when: ansible_distribution == "Ubuntu" and (ansible_distribution_major_version | int) >= 18
43 - name: remove resolvconf package
49 - name: generate resolv.conf
52 dest: /etc/resolv.conf