If the secret already exists, don't crash
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
parent
17f8c88111
commit
8dcf3d2faa
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue