containers: check item.container before pull/save 78/7378/1
authorCian Johnston <cian.johnston@est.tech>
Wed, 3 Feb 2021 11:43:22 +0000 (11:43 +0000)
committerCian Johnston <cian.johnston@est.tech>
Wed, 3 Feb 2021 15:47:52 +0000 (15:47 +0000)
In later versions of Kubespray, certain items (such as Helm) are
no longer fetched as a container. This change checks that the
download manifest in Kubespray specifies that the item in question
is meant to be treated as a container before pulling and saving.

Signed-off-by: Cian Johnston <cian.johnston@est.tech>
Change-Id: Iedbfb6f020c4d89e050f1fa83209634affe3ebab

playbooks/roles/package/tasks/containers.yaml

index 2d032b5bba754de40f473e47658b25d26ed89a07..c90f906a030ef73e6bad0b434019125ca80420de 100644 (file)
   loop: "{{ k8s_misc_images }}"
   become: true
   changed_when: false
+  when: downloads[item].container is defined and downloads[item].container
 
 - name: Pull other container images
   command: "docker pull {{ other_images[item.key].repo }}:{{ other_images[item.key].tag }}"
     chdir: "{{ containers_folder }}"
   become: true
   changed_when: false
+  when: downloads[item].container is defined and downloads[item].container
 
 - name: Save tiller container image (helm v2 only)
   command: |-