main.yml 597 B

123456789101112131415161718192021
  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. - include: glusterfs_config.yml
  8. when:
  9. - groups.glusterfs | default([]) | count > 0
  10. - include: glusterfs_registry.yml
  11. when:
  12. - "groups.glusterfs_registry | default([]) | count > 0 or openshift.hosted.registry.storage.kind == 'glusterfs' or openshift.hosted.registry.storage.glusterfs.swap"
  13. - name: Delete temp directory
  14. file:
  15. name: "{{ mktemp.stdout }}"
  16. state: absent
  17. changed_when: False
  18. check_mode: no