Skip to content

Commit

Permalink
optimize images sync
Browse files Browse the repository at this point in the history
  • Loading branch information
aine-etke committed Sep 12, 2024
1 parent 83c5dfa commit c0cbc51
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions roles/custom/skopeo/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
skopeo_target: registry.etke.cc
skopeo_ignore_text: "ghcr.io/etkecc"
skopeo_ignore_images:
- "{{ etherpad_container_image }}"
- "{{ matrix_synapse_admin_docker_image }}"
Expand Down
10 changes: 5 additions & 5 deletions roles/custom/skopeo/tasks/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
ansible.builtin.set_fact:
skopeo_sources: "{{ skopeo_sources | unique | sort }}"

- name: Print list of source images
debug:
msg: "{{ skopeo_sources }}"

- name: Populate target images dict
ansible.builtin.set_fact:
skopeo_targets: "{{ skopeo_targets | combine({item: skopeo_target + item | regex_search('/.*')}) }}"
when: item not in skopeo_ignore_images
when: item not in skopeo_ignore_images and skopeo_ignore_text not in item and skopeo_target not in item
loop: "{{ skopeo_sources }}"

- name: Print list of target images
debug:
msg: "{{ skopeo_targets }}"

- name: Check image status
ansible.builtin.uri:
url: "https://{{ skopeo_target }}/v2{{ item | regex_search('\/.*') | replace(':', '/manifests/') }}"
Expand Down

0 comments on commit c0cbc51

Please sign in to comment.