Allow skip kubeadm image prep but install kubeadm (#4904)
Change-Id: I744e9a192cd863a1ce22fbd16d217c5dfb16750c
This commit is contained in:
parent
4348e78b24
commit
6025981ceb
2 changed files with 8 additions and 1 deletions
|
@ -12,7 +12,6 @@
|
|||
when:
|
||||
- kube_version is version('v1.11.0', '>=')
|
||||
- not skip_downloads|default(false)
|
||||
- not skip_kubeadm_images|default(false)
|
||||
- inventory_hostname in groups['kube-master']
|
||||
tags:
|
||||
- download
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
template:
|
||||
src: "kubeadm-images.yaml.j2"
|
||||
dest: "{{ kube_config_dir }}/kubeadm-images.yaml"
|
||||
when:
|
||||
- not skip_kubeadm_images|default(false)
|
||||
|
||||
- name: prep_kubeadm_images | Copy kubeadm binary from download dir to system path
|
||||
synchronize:
|
||||
|
@ -43,6 +45,8 @@
|
|||
register: kubeadm_images_raw
|
||||
run_once: true
|
||||
changed_when: false
|
||||
when:
|
||||
- not skip_kubeadm_images|default(false)
|
||||
|
||||
- name: prep_kubeadm_images | Parse list of images
|
||||
vars:
|
||||
|
@ -59,8 +63,12 @@
|
|||
loop: "{{ kubeadm_images_list | flatten(levels=1) }}"
|
||||
register: kubeadm_images_cooked
|
||||
run_once: true
|
||||
when:
|
||||
- not skip_kubeadm_images|default(false)
|
||||
|
||||
- name: prep_kubeadm_images | Convert list of images to dict for later use
|
||||
set_fact:
|
||||
kubeadm_images: "{{ kubeadm_images_cooked.results | map(attribute='ansible_facts.kubeadm_image') | list | items2dict }}"
|
||||
run_once: true
|
||||
when:
|
||||
- not skip_kubeadm_images|default(false)
|
||||
|
|
Loading…
Reference in a new issue