main.yml 847 B

1234567891011121314151617181920212223242526272829
  1. ---
  2. - name: Create temp directory for doing work in
  3. command: mktemp -d /tmp/openshift-glusterfs-ansible-XXXXXX
  4. register: mktemp
  5. changed_when: False
  6. check_mode: no
  7. - name: Copy the admin client config
  8. command: >
  9. cp {{ openshift.common.config_base }}/master/admin.kubeconfig {{ mktemp.stdout }}/admin.kubeconfig
  10. changed_when: False
  11. check_mode: no
  12. - include_tasks: glusterfs_config.yml
  13. when:
  14. - groups.glusterfs | default([]) | count > 0
  15. - include_tasks: glusterfs_registry.yml
  16. when: >
  17. groups.glusterfs_registry | default([]) | count > 0
  18. or (openshift_hosted_registry_storage_kind | default(none) == 'glusterfs')
  19. or (openshift_hosted_registry_storage_glusterfs_swap | default(False))
  20. - name: Delete temp directory
  21. file:
  22. name: "{{ mktemp.stdout }}"
  23. state: absent
  24. changed_when: False
  25. check_mode: no