13 lines
584 B
YAML
13 lines
584 B
YAML
---
|
|||
|
|
# Образ скачивается по digest до замены контейнера: если реестр недоступен,
|
||
|
|
# старый контейнер продолжает работать.
|
||
|
|
- name: Pull the image by digest
|
||
|
|
ansible.builtin.command: "docker pull {{ image_pull_ref }}"
|
||
|
|
register: pulled
|
||
|
|
changed_when: "'Downloaded newer image' in pulled.stdout"
|
||
|
|
|
||
|
|
- name: Read the image id
|
||
|
|
ansible.builtin.command:
|
||
|
|
argv: [docker, image, inspect, --format, "{% raw %}{{.Id}}{% endraw %}", "{{ image_pull_ref }}"]
|
||
|
|
changed_when: false
|
||
|
|
register: built_image
|