diff --git a/deployment/container-image-prepare/container-image-prepare-baremetal-ansible.j2.yaml b/deployment/container-image-prepare/container-image-prepare-baremetal-ansible.j2.yaml index 1dd36c3229..d00710c158 100644 --- a/deployment/container-image-prepare/container-image-prepare-baremetal-ansible.j2.yaml +++ b/deployment/container-image-prepare/container-image-prepare-baremetal-ansible.j2.yaml @@ -132,3 +132,12 @@ outputs: {% endfor %} when: - (step | int) == 1 + upgrade_tasks: + - name: Make sure the Undercloud hostname is included in /etc/hosts + when: + - step|int == 1 + - undercloud_hosts_entries is defined + lineinfile: + dest: /etc/hosts + line: "{{ '{{ ' }} undercloud_hosts_entries | join('') {{ ' }}' }}" + state: present diff --git a/deployment/podman/podman-baremetal-ansible.yaml b/deployment/podman/podman-baremetal-ansible.yaml index c3f109d981..8264cd1bf6 100644 --- a/deployment/podman/podman-baremetal-ansible.yaml +++ b/deployment/podman/podman-baremetal-ansible.yaml @@ -136,13 +136,31 @@ outputs: service_config_settings: {} upgrade_tasks: + - name: Run podman install + when: + - step|int == 1 + block: + - name: Set container_registry_insecure_registries fact. + set_fact: + container_registry_insecure_registries: + if: + - insecure_registry_is_empty + - [] + - {get_param: DockerInsecureRegistryAddress} + - include_role: + name: tripleo-podman + tasks_from: tripleo_podman_install.yml + vars_from: "redhat.yml" + vars: + tripleo_container_registry_insecure_registries: "{{ container_registry_insecure_registries }}" + - name: system_upgrade_prepare step 2 tags: - never - system_upgrade - system_upgrade_prepare when: - - (step | int) == 2 + - step|int == 2 block: - name: Check if pcs is present stat: @@ -163,14 +181,6 @@ outputs: - system_upgrade - system_upgrade_prepare - - name: Run podman install - when: - - (step | int) == 1 - include_role: - name: tripleo_podman - tasks_from: tripleo_podman_install.yml - vars_from: "redhat.yml" - post_upgrade_tasks: - name: Purge everything about docker on the host when: