You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
639 B

  1. ---
  2. - name: Macvlan | restart network
  3. command: /bin/true
  4. notify:
  5. - Macvlan | reload network
  6. when: not ansible_os_family in ["Flatcar Container Linux by Kinvolk"]
  7. - name: Macvlan | reload network
  8. service:
  9. name: >-
  10. {% if ansible_os_family == "RedHat" -%}
  11. network
  12. {%- elif ansible_distribution == "Ubuntu" and ansible_distribution_release == "bionic" -%}
  13. systemd-networkd
  14. {%- elif ansible_os_family == "Debian" -%}
  15. networking
  16. {%- endif %}
  17. state: restarted
  18. when: not ansible_os_family in ["Flatcar Container Linux by Kinvolk"] and kube_network_plugin not in ['canal', 'calico']