fix: add task to handle registry logouts
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/docs Pipeline failed
ci/woodpecker/push/notify Pipeline was successful

This commit is contained in:
Robert Kaussow 2024-02-11 14:02:14 +01:00
parent 13672e86ab
commit fa97e3274f
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
2 changed files with 11 additions and 4 deletions

View File

@ -16,8 +16,7 @@ podman_nsremap_range_length: 65536
# - registry: myregistry.example.com (optional) # - registry: myregistry.example.com (optional)
# username: docker # username: docker
# password: secure # password: secure
# reauthorize: False # active: True
# state: present
# @end # @end
podman_registries: [] podman_registries: []

View File

@ -52,7 +52,15 @@
registry: "{{ item.registry }}" registry: "{{ item.registry }}"
username: "{{ item.username }}" username: "{{ item.username }}"
password: "{{ item.password }}" password: "{{ item.password }}"
state: '{{ item.state | default("present") }}' when: item.active | default(True) | bool
loop: "{{ podman_registries }}"
loop_control:
label: "{{ item.registry }}"
- name: Handle registry logouts
containers.podman.podman_logout:
registry: "{{ item.registry }}"
when: not item.active | default(True) | bool
loop: "{{ podman_registries }}" loop: "{{ podman_registries }}"
loop_control: loop_control:
label: "{{ item.registry }}" label: "{{ item.registry }}"