Retrive non-tripleo containers from buildah images
Due to fallback registry, non_tripleo_containers list does not contains the list of actual pulled containers, it needs to be retrived from buildah images output otherwise while pushing the containers it will fail complaining containers does not exists. In this patch, we are retriving the image id and then passing those image id to buildah to push it to content provider registry. It also collects only stdout from non_tripleo register ansible var to store necessary data in the file. Related-Bug: #1920873 Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com> Change-Id: I972d03650653a63c0f5df0b3c2ef7bb710b4afba
This commit is contained in:
@@ -104,10 +104,10 @@
|
||||
|
||||
# NOTE(mwhahaha): use buildah because --format can only be specified with buildah push.
|
||||
# Additionally we could switch to oci, but v2v2 is what we convert on the undercloud.
|
||||
- name: Pull non-tripleo containers (ceph, alertmanager, prometheus) to the content provider registry
|
||||
- name: Push non-tripleo containers (ceph, alertmanager, prometheus) to the content provider registry
|
||||
shell: >
|
||||
buildah images;
|
||||
buildah push --format=v2s2 --tls-verify=False --log-level debug {{ item }} \
|
||||
buildah push --format=v2s2 --tls-verify=False --log-level debug \
|
||||
$(buildah images -q {{ item.split('/')[-1] }}) \
|
||||
docker://{{ content_provider_registry_ip }}:{{ content_provider_registry_port }}/{{ docker_registry_namespace }}/{{ item.split('/')[-1] }};
|
||||
with_items: "{{ non_tripleo_containers }}"
|
||||
retries: 3
|
||||
@@ -119,7 +119,8 @@
|
||||
- skip_ansible_lint
|
||||
|
||||
- name: Dump non-tripleo containers output to file
|
||||
copy:
|
||||
local_action:
|
||||
module: copy
|
||||
content: "{{ non_tripleo }}"
|
||||
dest: "{{ ansible_user_dir }}/non_tripleo_containers.log"
|
||||
when: non_tripleo is defined
|
||||
|
||||
Reference in New Issue
Block a user