File tree Expand file tree Collapse file tree
ansible/roles/builder/tasks Expand file tree Collapse file tree Original file line number Diff line number Diff line change 163163- name : login to registry
164164 tags : deploy
165165 become : yes
166- when : build_image and push_image
167- command : docker login -u {{ registry_username }} -p {{ registry_token }} {{ registry_host }}
166+ when : ( build_image and push_image) or (not build_image)
167+ command : docker login -u {{ registry_username }} -p {{ registry_token }} -e "info@runnable.com" {{ registry_host }}
168168
169169- name : push docker image
170170 tags : deploy
171171 become : yes
172172 when : build_image and push_image
173173 command : docker push {{ container_image }}:{{ container_tag }}
174174
175+ - name : pull docker image
176+ tags : deploy
177+ become : yes
178+ when : not build_image
179+ command : docker pull {{ container_image }}:{{ container_tag }}
180+
175181- name : logout of registry
176182 tags : deploy
177183 become : yes
178- when : build_image and push_image
184+ when : ( build_image and push_image) or (not build_image)
179185 command : docker logout
You can’t perform that action at this time.
0 commit comments