Merge branch 'master' of /git/ansible
This commit is contained in:
commit
0521332637
2 changed files with 23 additions and 0 deletions
|
@ -14,6 +14,12 @@
|
||||||
description: bodhi
|
description: bodhi
|
||||||
appowners:
|
appowners:
|
||||||
- bowlofeggs
|
- bowlofeggs
|
||||||
|
- role: openshift/keytab
|
||||||
|
app: bodhi
|
||||||
|
secret_name: bodhi-keytab
|
||||||
|
service: bodhi
|
||||||
|
host: "bodhi.stg.fedoraproject.org"
|
||||||
|
when: env == "staging"
|
||||||
- role: openshift/secret-file
|
- role: openshift/secret-file
|
||||||
app: bodhi
|
app: bodhi
|
||||||
secret_name: bodhi-fedmsg-key
|
secret_name: bodhi-fedmsg-key
|
||||||
|
|
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