If the secret already exists, don't crash

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
Patrick Uiterwijk 2018-01-17 16:52:21 +00:00
parent 17f8c88111
commit 8dcf3d2faa

View file

@ -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