mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-26 21:33:14 +00:00
Check if image_pull_secrets variable is defined (#865)
* Do not attempt to backup secret if none are defined
This commit is contained in:
@@ -26,13 +26,15 @@
|
||||
# image_pull_secret is deprecated in favor of image_pull_secrets
|
||||
- name: Dump image_pull_secret into file
|
||||
include_tasks: dump_secret.yml
|
||||
loop:
|
||||
with_items:
|
||||
- image_pull_secret
|
||||
when: image_pull_secret is defined
|
||||
|
||||
- name: Dump image_pull_secrets into file
|
||||
include_tasks: dump_secret.yml
|
||||
loop: "{{ awx_spec.spec[image_pull_secrets] }}"
|
||||
with_items:
|
||||
- image_pull_secrets
|
||||
when: image_pull_secrets | default([]) | length
|
||||
|
||||
- name: Nest secrets under a single variable
|
||||
set_fact:
|
||||
|
||||
Reference in New Issue
Block a user