2016-08-18 23:14:52 +08:00
|
|
|
- name: Dnsmasq | restart network
|
2016-08-29 22:39:55 +08:00
|
|
|
command: /bin/true
|
|
|
|
notify:
|
|
|
|
- Dnsmasq | reload network
|
|
|
|
- Dnsmasq | update resolvconf
|
|
|
|
when: ansible_os_family != "CoreOS"
|
|
|
|
|
|
|
|
- name: Dnsmasq | reload network
|
2016-08-18 23:14:52 +08:00
|
|
|
service:
|
|
|
|
name: >-
|
|
|
|
{% if ansible_os_family == "RedHat" -%}
|
|
|
|
network
|
|
|
|
{%- elif ansible_os_family == "Debian" -%}
|
|
|
|
networking
|
|
|
|
{%- endif %}
|
|
|
|
state: restarted
|
2016-08-29 22:39:55 +08:00
|
|
|
when: ansible_os_family != "RedHat" and ansible_os_family != "CoreOS"
|
|
|
|
|
|
|
|
- name: Dnsmasq | update resolvconf
|
2016-09-27 17:54:12 +08:00
|
|
|
command: /bin/true
|
|
|
|
notify:
|
|
|
|
- Dnsmasq | reload resolvconf
|
|
|
|
- Dnsmasq | reload kubelet
|
2016-11-23 22:49:10 +08:00
|
|
|
when: ansible_os_family != "CoreOS"
|
|
|
|
|
|
|
|
- name: Dnsmasq | update resolvconf for CoreOS
|
|
|
|
command: /bin/true
|
|
|
|
notify:
|
|
|
|
- Dnsmasq | apply resolvconf cloud-init
|
|
|
|
- Dnsmasq | reload kubelet
|
|
|
|
when: ansible_os_family == "CoreOS"
|
2016-09-27 17:54:12 +08:00
|
|
|
|
|
|
|
- name: Dnsmasq | reload resolvconf
|
2016-08-29 22:39:55 +08:00
|
|
|
command: /sbin/resolvconf -u
|
|
|
|
ignore_errors: true
|
2016-09-27 17:54:12 +08:00
|
|
|
|
2016-11-23 22:49:10 +08:00
|
|
|
- name: Dnsmasq | apply resolvconf cloud-init
|
|
|
|
command: /usr/bin/coreos-cloudinit --from-file {{ resolveconf_cloud_init_conf }}
|
|
|
|
when: ansible_os_family == "CoreOS"
|
|
|
|
|
2016-09-27 17:54:12 +08:00
|
|
|
- name: Dnsmasq | reload kubelet
|
|
|
|
service:
|
|
|
|
name: kubelet
|
|
|
|
state: restarted
|
|
|
|
when: "{{ inventory_hostname in groups['kube-master'] }}"
|
|
|
|
ignore_errors: true
|