Rather than run_once, use first os-master entry
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
parent
f3d2bde922
commit
36b7948be8
13 changed files with 9 additions and 25 deletions
|
@ -1,29 +1,23 @@
|
|||
- name: Create temporary file
|
||||
tempfile: state=file
|
||||
register: tmpfile
|
||||
run_once: true
|
||||
|
||||
- name: Copy template {{template}} to temporary file ({{tmpfile.path}})
|
||||
template: src={{roles_path}}/openshift-apps/{{app}}/templates/{{template}} dest={{tmpfile.path}}
|
||||
when: template is defined
|
||||
run_once: true
|
||||
|
||||
- name: Copy file {{file}} to temporary file ({{tmpfile.path}})
|
||||
copy: src={{roles_path}}/openshift-apps/{{app}}/files/{{file}} dest={{tmpfile.path}}
|
||||
when: file is defined
|
||||
run_once: true
|
||||
|
||||
- name: Copy private file {{privatefile}} to temporary file ({{tmpfile.path}})
|
||||
copy: src={{private}}/files/{{privatefile}} dest={{tmpfile.path}}
|
||||
when: privatefile is defined
|
||||
run_once: true
|
||||
|
||||
- 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
|
||||
run_once: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue