install.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. ---
  2. # Fact setting
  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 ansible_service_broker facts
  9. set_fact:
  10. template_service_broker_image: "{{ template_service_broker_image | default(__template_service_broker_image) }}"
  11. - oc_project:
  12. name: openshift-template-service-broker
  13. state: present
  14. - command: mktemp -d /tmp/tsb-ansible-XXXXXX
  15. register: mktemp
  16. changed_when: False
  17. become: no
  18. - copy:
  19. src: "{{ __tsb_files_location }}/{{ item }}"
  20. dest: "{{ mktemp.stdout }}/{{ item }}"
  21. with_items:
  22. - "{{ __tsb_template_file }}"
  23. - "{{ __tsb_rbac_file }}"
  24. - name: Apply template file
  25. shell: >
  26. oc process -f "{{ mktemp.stdout }}/{{ __tsb_template_file }}" --param API_SERVER_CONFIG="{{ lookup('file', __tsb_files_location ~ '/' ~ __tsb_config_file) }}" | kubectl apply -f -
  27. # reconcile with rbac
  28. - name: Reconcile with RBAC file
  29. shell: >
  30. oc process -f "{{ mktemp.stdout }}/{{ __tsb_rbac_file }}" | oc auth reconcile -f -
  31. - name: copy tech preview extension file for service console UI
  32. copy:
  33. src: openshift-ansible-catalog-console.js
  34. dest: /etc/origin/master/openshift-ansible-catalog-console.js
  35. - file:
  36. state: absent
  37. name: "{{ mktemp.stdout }}"
  38. changed_when: False
  39. become: no