---
- name: Configure links
  template:
    src: link.j2
    dest: "/etc/systemd/network/10-{{ item.key }}.link"
    owner: root
    group: root
    mode: u=rw,g=r,o=r
  when: "item.value.enabled | default(True)"
  loop: "{{ systemd_link__links | dict2items }}"
  notify:
    - Restart systemd-udev-trigger

- name: Remove disabled links
  file:
    path: "/etc/systemd/network/10-{{ item.key }}.link"
    state: absent
  when: "not (item.value.enabled | default(True))"
  loop: "{{ systemd_link__links | dict2items }}"
  notify:
    - Restart systemd-udev-trigger
...