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.

46 lines
1.2 KiB

  1. - name: Dnsmasq | restart network
  2. command: /bin/true
  3. notify:
  4. - Dnsmasq | reload network
  5. - Dnsmasq | update resolvconf
  6. when: ansible_os_family != "CoreOS"
  7. - name: Dnsmasq | reload network
  8. service:
  9. name: >-
  10. {% if ansible_os_family == "RedHat" -%}
  11. network
  12. {%- elif ansible_os_family == "Debian" -%}
  13. networking
  14. {%- endif %}
  15. state: restarted
  16. when: ansible_os_family != "RedHat" and ansible_os_family != "CoreOS"
  17. - name: Dnsmasq | update resolvconf
  18. command: /bin/true
  19. notify:
  20. - Dnsmasq | reload resolvconf
  21. - Dnsmasq | reload kubelet
  22. when: ansible_os_family != "CoreOS"
  23. - name: Dnsmasq | update resolvconf for CoreOS
  24. command: /bin/true
  25. notify:
  26. - Dnsmasq | apply resolvconf cloud-init
  27. - Dnsmasq | reload kubelet
  28. when: ansible_os_family == "CoreOS"
  29. - name: Dnsmasq | reload resolvconf
  30. command: /sbin/resolvconf -u
  31. ignore_errors: true
  32. - name: Dnsmasq | apply resolvconf cloud-init
  33. command: /usr/bin/coreos-cloudinit --from-file {{ resolveconf_cloud_init_conf }}
  34. when: ansible_os_family == "CoreOS"
  35. - name: Dnsmasq | reload kubelet
  36. service:
  37. name: kubelet
  38. state: restarted
  39. when: "{{ inventory_hostname in groups['kube-master'] }}"
  40. ignore_errors: true