Merge "Add container repository cred permission checks"
This commit is contained in:
commit
b017e4832c
@ -8,6 +8,15 @@
|
||||
fail:
|
||||
msg: "{{ zj_image.registry }} credentials not found"
|
||||
|
||||
- name: Verify repository permission
|
||||
when: |
|
||||
not zj_image.repository | regex_search(container_registry_credentials[zj_image.registry].repository)
|
||||
loop: "{{ container_images }}"
|
||||
loop_control:
|
||||
loop_var: zj_image
|
||||
fail:
|
||||
msg: "{{ zj_image.repository }} not permitted by {{ container_registry_credentials[zj_image.registry].repository }}"
|
||||
|
||||
- name: Log in to registry
|
||||
no_log: true
|
||||
command: >-
|
||||
|
@ -8,6 +8,15 @@
|
||||
fail:
|
||||
msg: "{{ zj_image.registry }} credentials not found"
|
||||
|
||||
- name: Verify repository permission
|
||||
when: |
|
||||
not zj_image.repository | regex_search(container_registry_credentials[zj_image.registry].repository)
|
||||
loop: "{{ container_images }}"
|
||||
loop_control:
|
||||
loop_var: zj_image
|
||||
fail:
|
||||
msg: "{{ zj_image.repository }} not permitted by {{ container_registry_credentials[zj_image.registry].repository }}"
|
||||
|
||||
- name: Upload image to container registry
|
||||
loop: "{{ container_images }}"
|
||||
loop_control:
|
||||
|
Loading…
Reference in New Issue
Block a user