main.yaml 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. ---
  2. - name: Create temp directory for doing work in
  3. command: mktemp -td openshift-provisioners-ansible-XXXXXX
  4. register: mktemp
  5. changed_when: False
  6. check_mode: no
  7. - name: Copy the admin client config(s)
  8. command: >
  9. cp {{ openshift.common.config_base}}/master/admin.kubeconfig {{ mktemp.stdout }}/admin.kubeconfig
  10. changed_when: False
  11. check_mode: no
  12. tags: provisioners_init
  13. - name: Set eventrouter image facts
  14. set_fact:
  15. openshift_provisioners_image_prefix: "{{ openshift_provisioners_image_prefix | default(openshift_provisioners_image_prefix_dict[openshift_deployment_type]) }}"
  16. openshift_provisioners_image_version: "{{ openshift_provisioners_image_version | default(openshift_provisioners_image_version_dict[openshift_deployment_type]) }}"
  17. - include_tasks: install_provisioners.yaml
  18. when: openshift_provisioners_install_provisioners | default(false) | bool
  19. - include_tasks: uninstall_provisioners.yaml
  20. when: not openshift_provisioners_install_provisioners | default(false) | bool
  21. - name: Delete temp directory
  22. file:
  23. name: "{{ mktemp.stdout }}"
  24. state: absent
  25. tags: provisioners_cleanup
  26. changed_when: False
  27. check_mode: no