---
- name: Get target image info (docker)
  block:
    - community.docker.docker_image_info:
        name: "{{ service.image }}"
      register: docker_image_info

    - set_fact:
        service_image_info: "{{ docker_image_info }}"
      delegate_facts: true
  become: true
  delegate_to: "{{ service_image_info_delegate_host }}"
  when: kolla_container_engine == 'docker'

- name: Get target image info (podman)
  block:
    - containers.podman.podman_image_info:
        name: "{{ service.image }}"
      register: podman_image_info

    - set_fact:
        service_image_info: "{{ podman_image_info }}"
      delegate_facts: true
  become: true
  delegate_to: "{{ service_image_info_delegate_host }}"
  when: kolla_container_engine == 'podman'
