1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- ---
- # do any asserts here
- - name: Set default image variables based on deployment_type
- include_vars: "{{ item }}"
- with_first_found:
- - "{{ openshift_deployment_type | default(deployment_type) }}.yml"
- - "default_images.yml"
- - name: Set service_catalog image facts
- set_fact:
- openshift_service_catalog_broker_image_prefix: "{{ openshift_service_catalog_broker_image_prefix | default(__openshift_service_catalog_broker_image_prefix) }}"
- openshift_service_catalog_broker_image_version: "{{ openshift_service_catalog_broker_image_version | default(__openshift_service_catalog_broker_image_version) }}"
- - name: Set Service Catalog Broker namespace
- oc_project:
- state: present
- name: "{{ openshift_service_catalog_broker_namespace }}"
- # node_selector: "{{ openshift_service_catalog_broker_nodeselector | default(null) }}"
- - name: Create temp directory for doing work in
- command: mktemp -d /tmp/openshift-broker-ansible-XXXXXX
- register: mktemp
- changed_when: False
- ## broker process deployment
- - template:
- src: broker.j2
- dest: "{{ mktemp.stdout }}/broker.yml"
- vars:
- image: ""
- replicas: 1
- node_selector: ""
- cpu_limit: none
- memory_limit: none
- - name: Set Service Catalog Broker deployment
- oc_obj:
- state: present
- namespace: "{{ openshift_service_catalog_broker_namespace }}"
- kind: deployment
- name: ups-broker
- files:
- - "{{ mktemp.stdout }}/broker.yml"
- delete_after: yes
- - template:
- src: broker_service.j2
- dest: "{{ mktemp.stdout }}/broker_service.yml"
- - name: Set Service Catalog Broker service
- oc_obj:
- state: present
- namespace: "{{ openshift_service_catalog_broker_namespace }}"
- kind: service
- name: ups-broker
- files:
- - "{{ mktemp.stdout }}/broker_service.yml"
- delete_after: yes
- - name: Delete temp directory
- file:
- name: "{{ mktemp.stdout }}"
- state: absent
- changed_when: False
|