diff --git a/roles/undercloud-deploy/tasks/main.yml b/roles/undercloud-deploy/tasks/main.yml index 9e54beb2f..1aab158c1 100644 --- a/roles/undercloud-deploy/tasks/main.yml +++ b/roles/undercloud-deploy/tasks/main.yml @@ -4,6 +4,25 @@ gather_subset: "!min,distribution" when: ansible_distribution is not defined +- name: Run podman --version + command: podman --version + ignore_errors: true + register: podman_ver + tags: + - undercloud-install + + +- name: Set fact for podman version + set_fact: + podman_version: >- + {%- if podman_ver is success -%} + {{ podman_ver.stdout | replace("podman version ", "") }} + {%- else -%}0.0 + {%- endif -%} + tags: + - undercloud-install + + - include: novajoin_prep.yml when: enable_tls_everywhere|bool and prepare_novajoin|bool tags: diff --git a/roles/undercloud-deploy/templates/containers-prepare-parameter.yaml.j2 b/roles/undercloud-deploy/templates/containers-prepare-parameter.yaml.j2 index f77751fff..662f626b3 100644 --- a/roles/undercloud-deploy/templates/containers-prepare-parameter.yaml.j2 +++ b/roles/undercloud-deploy/templates/containers-prepare-parameter.yaml.j2 @@ -14,6 +14,9 @@ parameter_defaults: modify_vars: tasks_from: yum_update.yml yum_repos_dir_path: /etc/yum.repos.d +{% if release not in ['pike','queens','rocky','stein'] and podman_version is version('1.5.0', '>=') %} + yum_cache: /var/tmp/tripleo-container-image-prepare-cache +{% endif %} update_repo: "{{ update_containers_repo }}" {% if release not in ['newton', 'ocata', 'pike', 'queens', 'rocky'] %} container_build_tool: buildah