From 7370ca76aafad52d75ab84655e7ee7c98e41002d Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Fri, 9 Nov 2018 08:53:09 -0500 Subject: [PATCH] tripleo-container-tag: pull image before tagging Adding a container pull before the tagging operation so we are sure that the image is in the local registry. We were relying on docker-puppet.py script to perform the pull but now we do the tag with Ansible, it's safer to ensure that the image is here. This patch runs a container pull before the container tag command. It works with both podman & docker since we use container_cli. Change-Id: Ib9d4ae9c2b415e427deb4b0cfc441febaa210f77 Closes-Bug: #1802511 --- roles/tripleo-container-tag/tasks/main.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roles/tripleo-container-tag/tasks/main.yaml b/roles/tripleo-container-tag/tasks/main.yaml index ac10b9961..8731fbf27 100644 --- a/roles/tripleo-container-tag/tasks/main.yaml +++ b/roles/tripleo-container-tag/tasks/main.yaml @@ -1,3 +1,6 @@ --- +- name: Pull {{ container_image }} image + shell: "{{ container_cli }} pull {{container_image}}" + - name: Tag {{ container_image_latest }} to latest {{ container_image }} image shell: "{{ container_cli }} tag {{container_image}} {{container_image_latest}}"