---
- name: Macvlan | reload network
  service:
    # noqa: jinja[spacing]
    name: >-
      {% if ansible_os_family == "RedHat" -%}
      network
      {%- elif ansible_distribution == "Ubuntu" and ansible_distribution_release == "bionic" -%}
      systemd-networkd
      {%- elif ansible_os_family == "Debian" -%}
      networking
      {%- endif %}
    state: restarted
  when: not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"] and kube_network_plugin not in ['calico']
  listen: Macvlan | restart network
