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.

35 lines
1.2 KiB

  1. - name: Preinstall | restart network
  2. command: /bin/true
  3. notify:
  4. - Preinstall | reload network
  5. - Preinstall | reload kubelet
  6. when: not ansible_os_family in ["CoreOS", "Container Linux by CoreOS"]
  7. # FIXME(bogdando) https://github.com/projectcalico/felix/issues/1185
  8. - name: Preinstall | reload network
  9. service:
  10. name: >-
  11. {% if ansible_os_family == "RedHat" -%}
  12. network
  13. {%- elif ansible_os_family == "Debian" -%}
  14. networking
  15. {%- endif %}
  16. state: restarted
  17. when: not ansible_os_family in ["CoreOS", "Container Linux by CoreOS"] and kube_network_plugin not in ['canal', 'calico']
  18. - name: Preinstall | update resolvconf for Container Linux by CoreOS
  19. command: /bin/true
  20. notify:
  21. - Preinstall | apply resolvconf cloud-init
  22. - Preinstall | reload kubelet
  23. when: ansible_os_family in ["CoreOS", "Container Linux by CoreOS"]
  24. - name: Preinstall | apply resolvconf cloud-init
  25. command: /usr/bin/coreos-cloudinit --from-file {{ resolveconf_cloud_init_conf }}
  26. when: ansible_os_family in ["CoreOS", "Container Linux by CoreOS"]
  27. - name: Preinstall | reload kubelet
  28. service:
  29. name: kubelet
  30. state: restarted
  31. when: "{{ inventory_hostname in groups['kube-master'] and not dns_early|bool }}"