2016-12-07 15:57:05 +00:00
|
|
|
- name: Preinstall | restart network
|
2016-08-29 14:39:55 +00:00
|
|
|
command: /bin/true
|
|
|
|
notify:
|
2016-12-07 15:57:05 +00:00
|
|
|
- Preinstall | reload network
|
2016-11-30 13:06:11 +00:00
|
|
|
- Preinstall | reload kubelet
|
2017-02-01 04:31:57 +00:00
|
|
|
- Preinstall | kube-controller configured
|
|
|
|
- Preinstall | stop controller
|
|
|
|
- Preinstall | pause for controller
|
|
|
|
- Preinstall | restart controller
|
2017-01-05 15:32:08 +00:00
|
|
|
when: not ansible_os_family in ["CoreOS", "Container Linux by CoreOS"]
|
2016-08-29 14:39:55 +00:00
|
|
|
|
2016-11-30 13:06:11 +00:00
|
|
|
# FIXME(bogdando) https://github.com/projectcalico/felix/issues/1185
|
2016-12-07 15:57:05 +00:00
|
|
|
- name: Preinstall | reload network
|
2016-08-18 15:14:52 +00:00
|
|
|
service:
|
|
|
|
name: >-
|
|
|
|
{% if ansible_os_family == "RedHat" -%}
|
|
|
|
network
|
|
|
|
{%- elif ansible_os_family == "Debian" -%}
|
|
|
|
networking
|
|
|
|
{%- endif %}
|
|
|
|
state: restarted
|
2017-01-05 15:32:08 +00:00
|
|
|
when: not ansible_os_family in ["CoreOS", "Container Linux by CoreOS"] and kube_network_plugin not in ['canal', 'calico']
|
2016-11-23 14:49:10 +00:00
|
|
|
|
2017-01-05 10:35:16 +00:00
|
|
|
- name: Preinstall | update resolvconf for Container Linux by CoreOS
|
2016-11-23 14:49:10 +00:00
|
|
|
command: /bin/true
|
|
|
|
notify:
|
2016-12-07 15:57:05 +00:00
|
|
|
- Preinstall | apply resolvconf cloud-init
|
|
|
|
- Preinstall | reload kubelet
|
2017-01-05 15:32:08 +00:00
|
|
|
when: ansible_os_family in ["CoreOS", "Container Linux by CoreOS"]
|
2016-09-27 09:54:12 +00:00
|
|
|
|
2016-12-07 15:57:05 +00:00
|
|
|
- name: Preinstall | apply resolvconf cloud-init
|
2016-11-23 14:49:10 +00:00
|
|
|
command: /usr/bin/coreos-cloudinit --from-file {{ resolveconf_cloud_init_conf }}
|
2017-01-05 15:32:08 +00:00
|
|
|
when: ansible_os_family in ["CoreOS", "Container Linux by CoreOS"]
|
2016-11-23 14:49:10 +00:00
|
|
|
|
2016-12-07 15:57:05 +00:00
|
|
|
- name: Preinstall | reload kubelet
|
2016-09-27 09:54:12 +00:00
|
|
|
service:
|
|
|
|
name: kubelet
|
|
|
|
state: restarted
|
2017-02-01 04:31:57 +00:00
|
|
|
notify:
|
|
|
|
- Preinstall | kube-controller configured
|
|
|
|
- Preinstall | stop controller
|
|
|
|
- Preinstall | pause for controller
|
|
|
|
- Preinstall | restart controller
|
2017-04-04 17:43:47 +00:00
|
|
|
when: not dns_early|bool
|
2017-02-01 04:31:57 +00:00
|
|
|
|
|
|
|
- name: Preinstall | kube-controller configured
|
|
|
|
stat: path="{{ kube_manifest_dir }}/kube-controller-manager.manifest"
|
|
|
|
register: kube_controller_set
|
|
|
|
when: inventory_hostname in groups['kube-master'] and dns_mode != 'none' and resolvconf_mode == 'host_resolvconf'
|
|
|
|
|
|
|
|
- name: Preinstall | stop controller
|
|
|
|
replace:
|
|
|
|
dest: "{{ kube_manifest_dir }}/kube-controller-manager.manifest"
|
|
|
|
regexp: '(\s+)image:\s+.*?$'
|
|
|
|
replace: '\1image: kill.controller.using.fake.image.in:manifest'
|
|
|
|
when: inventory_hostname in groups['kube-master'] and dns_mode != 'none' and resolvconf_mode == 'host_resolvconf' and kube_controller_set.stat.exists
|
|
|
|
|
|
|
|
- name: Preinstall | pause for controller
|
|
|
|
pause: seconds=20
|
|
|
|
when: inventory_hostname in groups['kube-master'] and dns_mode != 'none' and resolvconf_mode == 'host_resolvconf' and kube_controller_set.stat.exists
|
|
|
|
|
|
|
|
- name: Preinstall | restart controller
|
|
|
|
replace:
|
|
|
|
dest: "{{ kube_manifest_dir }}/kube-controller-manager.manifest"
|
|
|
|
regexp: '(\s+)image:\s+.*?$'
|
|
|
|
replace: '\1image: {{ hyperkube_image_repo }}:{{ hyperkube_image_tag }}'
|
|
|
|
when: inventory_hostname in groups['kube-master'] and dns_mode != 'none' and resolvconf_mode == 'host_resolvconf' and kube_controller_set.stat.exists
|
|
|
|
|