Housekeeping;Improved feedback;Prevent duplicates
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Danny Bessems 2022-11-29 11:24:26 +01:00
parent 92eee0744e
commit b890a03760

View File

@ -21,10 +21,11 @@
containerimages_{{ item.source }}: "{{ item.results }}"
loop:
- source: charts
# results: "{{ (containerimages.results | map(attribute='stdout_lines') | select('defined') | flatten }}"
results: "{{ containerimages | json_query('results[*].stdout_lines') | select() | flatten | list }}"
- source: manifests
results: "{{ parsedmanifests | json_query('results[*].stdout_lines') | select() | flatten | list }}"
loop_control:
label: "{{ item.source }}"
- name: Pull and store containerimages
ansible.builtin.shell:
@ -35,4 +36,4 @@
docker://{{ item }} \
docker-archive:./{{ ( item | regex_findall('[^/:]+'))[-2] }}_{{ lookup('ansible.builtin.password', '/dev/null length=5 chars=ascii_lowercase,digits seed={{ item }}') }}.tar:{{ item }}
chdir: /opt/metacluster/container-images
loop: "{{ containerimages_charts + containerimages_manifests + dependencies.container_images | unique }}"
loop: "{{ (containerimages_charts + containerimages_manifests + dependencies.container_images) | flatten | unique | sort }}"