2015-10-03 20:19:50 +00:00
|
|
|
---
|
2016-07-08 09:59:21 +00:00
|
|
|
- include: pre-upgrade.yml
|
2016-12-08 13:36:00 +00:00
|
|
|
tags: k8s-pre-upgrade
|
2015-12-16 22:49:01 +00:00
|
|
|
|
2017-09-15 21:28:15 +00:00
|
|
|
# upstream bug: https://github.com/kubernetes/kubeadm/issues/441
|
|
|
|
- name: Disable kube_basic_auth until kubeadm/441 is fixed
|
|
|
|
set_fact:
|
|
|
|
kube_basic_auth: false
|
|
|
|
when: kubeadm_enabled|bool|default(false)
|
|
|
|
|
2017-09-13 18:00:51 +00:00
|
|
|
- include: users-file.yml
|
|
|
|
when: kube_basic_auth|default(true)
|
|
|
|
|
2016-07-25 10:56:58 +00:00
|
|
|
- name: Copy kubectl from hyperkube container
|
2016-12-23 14:44:44 +00:00
|
|
|
command: "{{ docker_bin_dir }}/docker run --rm -v {{ bin_dir }}:/systembindir {{ hyperkube_image_repo }}:{{ hyperkube_image_tag }} /bin/cp /hyperkube /systembindir/kubectl"
|
2016-09-13 12:36:01 +00:00
|
|
|
register: kube_task_result
|
|
|
|
until: kube_task_result.rc == 0
|
|
|
|
retries: 4
|
2016-09-15 09:23:27 +00:00
|
|
|
delay: "{{ retry_stagger | random + 3 }}"
|
2016-01-22 15:37:07 +00:00
|
|
|
changed_when: false
|
2016-12-08 13:36:00 +00:00
|
|
|
tags: [hyperkube, kubectl, upgrade]
|
2015-12-11 10:52:20 +00:00
|
|
|
|
2017-01-17 17:36:58 +00:00
|
|
|
- name: Install kubectl bash completion
|
|
|
|
shell: "{{ bin_dir }}/kubectl completion bash >/etc/bash_completion.d/kubectl.sh"
|
2016-11-14 08:22:46 +00:00
|
|
|
when: ansible_os_family in ["Debian","RedHat"]
|
2016-12-08 13:36:00 +00:00
|
|
|
tags: kubectl
|
2016-11-14 08:22:46 +00:00
|
|
|
|
2017-01-17 17:36:58 +00:00
|
|
|
- name: Set kubectl bash completion file
|
|
|
|
file:
|
|
|
|
path: /etc/bash_completion.d/kubectl.sh
|
2016-11-14 08:22:46 +00:00
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0755
|
2017-01-17 17:36:58 +00:00
|
|
|
when: ansible_os_family in ["Debian","RedHat"]
|
2016-12-08 13:36:00 +00:00
|
|
|
tags: [kubectl, upgrade]
|
2016-11-14 08:22:46 +00:00
|
|
|
|
2017-09-13 18:00:51 +00:00
|
|
|
- task: Include kubeadm setup if enabled
|
|
|
|
include: kubeadm-setup.yml
|
|
|
|
when: kubeadm_enabled|bool|default(false)
|
2017-06-27 04:27:25 +00:00
|
|
|
|
2017-09-13 18:00:51 +00:00
|
|
|
- task: Include static pod setup if not using kubeadm
|
|
|
|
include: static-pod-setup.yml
|
|
|
|
when: not kubeadm_enabled|bool|default(false)
|