Adjust the secret-file role to work with OCP4
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
parent
9353cf9449
commit
90715412f2
3 changed files with 11 additions and 1 deletions
|
@ -77,21 +77,25 @@
|
||||||
secret_name: bodhi-keytab
|
secret_name: bodhi-keytab
|
||||||
service: bodhi
|
service: bodhi
|
||||||
host: "bodhi{{ env_suffix }}.fedoraproject.org"
|
host: "bodhi{{ env_suffix }}.fedoraproject.org"
|
||||||
|
ocp4: true
|
||||||
- role: openshift/secret-file
|
- role: openshift/secret-file
|
||||||
app: bodhi
|
app: bodhi
|
||||||
secret_name: bodhi-fedora-messaging-ca
|
secret_name: bodhi-fedora-messaging-ca
|
||||||
key: cacert.pem
|
key: cacert.pem
|
||||||
privatefile: "rabbitmq/{{env}}/pki/ca.crt"
|
privatefile: "rabbitmq/{{env}}/pki/ca.crt"
|
||||||
|
ocp4: true
|
||||||
- role: openshift/secret-file
|
- role: openshift/secret-file
|
||||||
app: bodhi
|
app: bodhi
|
||||||
secret_name: bodhi-fedora-messaging-crt
|
secret_name: bodhi-fedora-messaging-crt
|
||||||
key: bodhi-cert.pem
|
key: bodhi-cert.pem
|
||||||
privatefile: "rabbitmq/{{env}}/pki/issued/bodhi{{env_suffix}}.crt"
|
privatefile: "rabbitmq/{{env}}/pki/issued/bodhi{{env_suffix}}.crt"
|
||||||
|
ocp4: true
|
||||||
- role: openshift/secret-file
|
- role: openshift/secret-file
|
||||||
app: bodhi
|
app: bodhi
|
||||||
secret_name: bodhi-fedora-messaging-key
|
secret_name: bodhi-fedora-messaging-key
|
||||||
key: bodhi-key.pem
|
key: bodhi-key.pem
|
||||||
privatefile: "rabbitmq/{{env}}/pki/private/bodhi{{env_suffix}}.key"
|
privatefile: "rabbitmq/{{env}}/pki/private/bodhi{{env_suffix}}.key"
|
||||||
|
ocp4: true
|
||||||
- role: openshift/object
|
- role: openshift/object
|
||||||
app: bodhi
|
app: bodhi
|
||||||
template: imagestreams-tagged.yml
|
template: imagestreams-tagged.yml
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
os_app: "{{app}}"
|
os_app: "{{app}}"
|
||||||
|
ocp4: false
|
||||||
|
|
|
@ -23,4 +23,9 @@
|
||||||
- name: Call `oc secrets new` on the copied file
|
- name: Call `oc secrets new` on the copied file
|
||||||
shell: oc -n {{os_app}} secrets new {{secret_name}} {{key}}=/etc/openshift_apps/{{os_app}}/{{key}}
|
shell: oc -n {{os_app}} secrets new {{secret_name}} {{key}}=/etc/openshift_apps/{{os_app}}/{{key}}
|
||||||
register: create_out
|
register: create_out
|
||||||
when: secret_template.changed or secret_file.changed or secret_privatefile.changed
|
when: not ocp4 and (secret_template.changed or secret_file.changed or secret_privatefile.changed)
|
||||||
|
|
||||||
|
- name: Call `oc create secret generic` on the copied file
|
||||||
|
shell: oc -n {{os_app}} create secret generic {{secret_name}} --from-file={{key}}=/etc/openshift_apps/{{os_app}}/{{key}}
|
||||||
|
register: create_out
|
||||||
|
when: ocp4 and (secret_template.changed or secret_file.changed or secret_privatefile.changed)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue