My Ansible Playbook to install an OpenShift Lab
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.

27 lines
1.0 KiB

---
- name: Create a temporary directory
tempfile: state=directory
register: tempfile
- name: Download 'cors.lua'
get_url: dest='{{ tempfile.path }}/cors.lua' url={{ threescale_apicast_cors_lua }}
- name: Download 'cors.conf'
get_url: dest='{{ tempfile.path }}/cors.conf' url={{ threescale_apicast_cors_conf }}
- name: Create ConfigMap 'apicast-custom-module'
command: chdir={{ tempfile.path }} oc create configmap apicast-custom-module --from-file=cors.lua -n "{{ threescale_project }}"
register: oc
failed_when: oc.rc > 0 and 'Error from server (AlreadyExists):' not in oc.stderr
changed_when: oc.rc == 0
- name: Create ConfigMap 'cors-conf'
command: chdir={{ tempfile.path }} oc create configmap apicast.d --from-file=cors.conf -n "{{ threescale_project }}"
register: oc
failed_when: oc.rc > 0 and 'Error from server (AlreadyExists):' not in oc.stderr
changed_when: oc.rc == 0
- include: patch_apicast.yml
with_items:
- apicast-staging
- apicast-production