From: Cian Johnston Date: Wed, 3 Feb 2021 11:43:22 +0000 (+0000) Subject: containers: check item.container before pull/save X-Git-Url: https://gerrit.nordix.org/gitweb?p=infra%2Fstack%2Fkubernetes.git;a=commitdiff_plain;h=df6ea7a608badaa4f78783bc0ac6184ce484e522 containers: check item.container before pull/save 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 Change-Id: Iedbfb6f020c4d89e050f1fa83209634affe3ebab --- diff --git a/playbooks/roles/package/tasks/containers.yaml b/playbooks/roles/package/tasks/containers.yaml index 2d032b5..c90f906 100644 --- a/playbooks/roles/package/tasks/containers.yaml +++ b/playbooks/roles/package/tasks/containers.yaml @@ -101,6 +101,7 @@ 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 }}" @@ -128,6 +129,7 @@ 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: |-