diff --git a/roles/tripleo-container-tag/README.md b/roles/tripleo-container-tag/README.md index 3485b3a98..da81c477c 100644 --- a/roles/tripleo-container-tag/README.md +++ b/roles/tripleo-container-tag/README.md @@ -15,6 +15,7 @@ Role variables - container_image: -- Name of the container image to tag. - container_image_latest: -- Name of the tag. - container_cli: -- Name of the Container CLI tool (default to docker). +- pull_image: -- Pulling or not the image passed in container_image variable ( default to true). Example Playbook ---------------- diff --git a/roles/tripleo-container-tag/defaults/main.yaml b/roles/tripleo-container-tag/defaults/main.yaml index 211d13ff7..0ee0e96f2 100644 --- a/roles/tripleo-container-tag/defaults/main.yaml +++ b/roles/tripleo-container-tag/defaults/main.yaml @@ -1,2 +1,3 @@ --- container_cli: docker +pull_image: true diff --git a/roles/tripleo-container-tag/tasks/main.yaml b/roles/tripleo-container-tag/tasks/main.yaml index 8731fbf27..0e6b05e54 100644 --- a/roles/tripleo-container-tag/tasks/main.yaml +++ b/roles/tripleo-container-tag/tasks/main.yaml @@ -1,6 +1,7 @@ --- - name: Pull {{ container_image }} image shell: "{{ container_cli }} pull {{container_image}}" + when: pull_image|bool - name: Tag {{ container_image_latest }} to latest {{ container_image }} image shell: "{{ container_cli }} tag {{container_image}} {{container_image_latest}}"