You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
1013 B
19 lines
1013 B
---
|
|
|
|
- debug: msg="Updating {{ item }}"
|
|
|
|
- name: Check if APICast's DC has volumes
|
|
command: oc get dc {{ item }} -o jsonpath='{range .spec.template.spec.volumes[*]}{.name}{"\n"}{end}' -n "{{ threescale_project }}"
|
|
register: volumes
|
|
changed_when: false
|
|
|
|
- name: Add volume 'apicast-custom-module'
|
|
command: 'oc set volume dc/{{ item }} -n {{ threescale_project }} --add --name=apicast-custom-module --mount-path /opt/app-root/src/src/custom/ --configmap-name=apicast-custom-module -t configmap'
|
|
when: "'apicast-custom-module' not in volumes.stdout_lines"
|
|
|
|
- name: Add volume 'apicastd'
|
|
command: 'oc set volume dc/{{ item }} -n {{ threescale_project }} --add --name=apicastd --mount-path /opt/app-root/src/apicast.d/ --configmap-name=apicast.d -t configmap'
|
|
when: "'apicastd' not in volumes.stdout_lines"
|
|
|
|
- name: Add environment variable APICAST_MODULE to the APICast DeploymentConfig
|
|
command: oc env dc/{{ item }} APICAST_MODULE=custom/cors -n {{ threescale_project }}
|
|
|