main.yaml 830 B

123456789101112131415161718192021222324252627
  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. - include: "{{ role_path }}/tasks/install_provisioners.yaml"
  14. when: openshift_provisioners_install_provisioners | default(false) | bool
  15. - include: "{{ role_path }}/tasks/uninstall_provisioners.yaml"
  16. when: not openshift_provisioners_install_provisioners | default(false) | bool
  17. - name: Delete temp directory
  18. file:
  19. name: "{{ mktemp.stdout }}"
  20. state: absent
  21. tags: provisioners_cleanup
  22. changed_when: False
  23. check_mode: no