Add openshift/keytab
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
parent
f82264261f
commit
f81f5a943f
1 changed files with 17 additions and 0 deletions
17
roles/openshift/keytab/tasks/main.yml
Normal file
17
roles/openshift/keytab/tasks/main.yml
Normal file
|
@ -0,0 +1,17 @@
|
|||
- name: Create temporary file
|
||||
tempfile: state=file
|
||||
register: tmpfile
|
||||
run_once: true
|
||||
|
||||
- include_role: keytab/service
|
||||
kt_location: "{{ tmpfile.path }}"
|
||||
|
||||
- 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