summaryrefslogtreecommitdiff
path: root/roles/vm-network/tasks/systemd-link.yaml
blob: ad12cd3754b720b7c505e30963cef5a5df440e3d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
---
- name: remove legacy systemd.link units
  file:
    name: "/etc/systemd/network/{{ item }}"
    state: absent
  with_items:
  - 50-virtio-kernel-names.link
  - 99-default.link

- name: install systemd network link units
  template:
    src: systemd.link.j2
    dest: "/etc/systemd/network/{{ '%02d' | format(item.idx + 10) }}-{{ item.name }}.link"
  with_items: "{{ srv_network.systemd_link.interfaces }}"
  notify: rebuild initramfs