remove.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. ---
  2. - command: mktemp -d /tmp/tsb-ansible-XXXXXX
  3. register: mktemp
  4. changed_when: False
  5. - name: Copy admin client config
  6. command: >
  7. cp {{ openshift.common.config_base }}/master//admin.kubeconfig {{ mktemp.stdout }}/admin.kubeconfig
  8. changed_when: false
  9. - copy:
  10. src: "{{ item }}"
  11. dest: "{{ mktemp.stdout }}/{{ item }}"
  12. with_items:
  13. - "{{ __tsb_template_file }}"
  14. - "{{ __tsb_broker_file }}"
  15. - name: Delete TSB broker
  16. shell: >
  17. {{ openshift_client_binary }} process --config={{ mktemp.stdout }}/admin.kubeconfig -f "{{ mktemp.stdout }}/{{ __tsb_broker_file }}" | {{ openshift_client_binary }} delete --config={{ mktemp.stdout }}/admin.kubeconfig --ignore-not-found -f -
  18. - name: Delete TSB objects
  19. shell: >
  20. {{ openshift_client_binary }} process --config={{ mktemp.stdout }}/admin.kubeconfig -f "{{ mktemp.stdout }}/{{ __tsb_template_file }}" | {{ openshift_client_binary }} delete --config={{ mktemp.stdout }}/admin.kubeconfig --ignore-not-found -f -
  21. - name: empty out tech preview extension file for service console UI
  22. copy:
  23. src: remove-openshift-ansible-catalog-console.js
  24. dest: /etc/origin/master/openshift-ansible-catalog-console.js
  25. - oc_project:
  26. name: openshift-template-service-broker
  27. state: absent
  28. - file:
  29. state: absent
  30. name: "{{ mktemp.stdout }}"
  31. changed_when: False