Merge branch 'master' of /git/ansible

This commit is contained in:
Randy Barlow 2018-04-16 23:29:34 +00:00
commit 0521332637
2 changed files with 23 additions and 0 deletions

View file

@ -14,6 +14,12 @@
description: bodhi
appowners:
- bowlofeggs
- role: openshift/keytab
app: bodhi
secret_name: bodhi-keytab
service: bodhi
host: "bodhi.stg.fedoraproject.org"
when: env == "staging"
- role: openshift/secret-file
app: bodhi
secret_name: bodhi-fedmsg-key

View 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