Merge "Make the image pulling optional for tripleo-container-tag role."

This commit is contained in:
Zuul 2019-02-05 19:24:51 +00:00 committed by Gerrit Code Review
commit d115905dbd
3 changed files with 3 additions and 0 deletions

View File

@ -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
----------------

View File

@ -1,2 +1,3 @@
---
container_cli: docker
pull_image: true

View File

@ -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}}"