install.yml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. ---
  2. # do any asserts here
  3. - name: Set default image variables based on deployment_type
  4. include_vars: "{{ item }}"
  5. with_first_found:
  6. - "{{ openshift_deployment_type | default(deployment_type) }}.yml"
  7. - "default_images.yml"
  8. - name: Set service_catalog image facts
  9. set_fact:
  10. openshift_service_catalog_broker_image_prefix: "{{ openshift_service_catalog_broker_image_prefix | default(__openshift_service_catalog_broker_image_prefix) }}"
  11. openshift_service_catalog_broker_image_version: "{{ openshift_service_catalog_broker_image_version | default(__openshift_service_catalog_broker_image_version) }}"
  12. - name: Set Service Catalog Broker namespace
  13. oc_project:
  14. state: present
  15. name: "{{ openshift_service_catalog_broker_namespace }}"
  16. # node_selector: "{{ openshift_service_catalog_broker_nodeselector | default(null) }}"
  17. - name: Create temp directory for doing work in
  18. command: mktemp -d /tmp/openshift-broker-ansible-XXXXXX
  19. register: mktemp
  20. changed_when: False
  21. ## broker process deployment
  22. - template:
  23. src: broker.j2
  24. dest: "{{ mktemp.stdout }}/broker.yml"
  25. vars:
  26. image: ""
  27. replicas: 1
  28. node_selector: ""
  29. cpu_limit: none
  30. memory_limit: none
  31. - name: Set Service Catalog Broker deployment
  32. oc_obj:
  33. state: present
  34. namespace: "{{ openshift_service_catalog_broker_namespace }}"
  35. kind: deployment
  36. name: ups-broker
  37. files:
  38. - "{{ mktemp.stdout }}/broker.yml"
  39. delete_after: yes
  40. - template:
  41. src: broker_service.j2
  42. dest: "{{ mktemp.stdout }}/broker_service.yml"
  43. - name: Set Service Catalog Broker service
  44. oc_obj:
  45. state: present
  46. namespace: "{{ openshift_service_catalog_broker_namespace }}"
  47. kind: service
  48. name: ups-broker
  49. files:
  50. - "{{ mktemp.stdout }}/broker_service.yml"
  51. delete_after: yes
  52. - name: Delete temp directory
  53. file:
  54. name: "{{ mktemp.stdout }}"
  55. state: absent
  56. changed_when: False