mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-03-20 12:07:34 +08:00
If the secret already exists, don't crash
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
@@ -21,6 +21,8 @@
|
||||
- name: Call `oc secrets new` on the copied file
|
||||
shell: oc -n {{app}} secrets new {{secret_name}} {{key}}={{tmpfile.path}}
|
||||
run_once: true
|
||||
register: create_out
|
||||
failed_when: "create_out.rc != 0 and 'AlreadyExists' not in create_out.stderr"
|
||||
|
||||
- name: Delete temporary file
|
||||
file: path={{tmpfile.path}} state=absent
|
||||
|
||||
Reference in New Issue
Block a user