docker2podman: make images pulling optional

This commit makes the images pulling skipped if podman isn't installed
on the machine.

In OSP context, the podman installation is done later in the workflow,
it means all `podman pull` commands will fail.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1849559

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 37b20b6525)
pull/5445/head
Guillaume Abrioux 2020-06-22 14:35:16 +02:00 committed by Dimitri Savineau
parent 31b0da4cae
commit 4e42503218
1 changed files with 45 additions and 36 deletions

View File

@ -84,6 +84,15 @@
tags: with_pkg
when: not is_atomic | bool
- name: check podman presence
command: command -v podman
register: podman_presence
changed_when: false
failed_when: false
- name: pulling images from docker daemon
when: podman_presence.rc == 0
block:
- name: "pulling {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} image from docker daemon"
command: "{{ timeout_command }} {{ container_binary }} pull docker-daemon:{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
changed_when: false