summaryrefslogtreecommitdiffstats
path: root/roles/openshift_storage_glusterfs/tasks/glusterfs_registry.yml
blob: f3562b671e257b272ffa15c1a92b6206dc60d17e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
---
- include_tasks: glusterfs_registry_facts.yml

- include_tasks: glusterfs_common.yml
  when:
  - glusterfs_nodes | default([]) | count > 0
  - "'glusterfs' not in groups or glusterfs_nodes != groups.glusterfs"

- name: Check if GlusterFS registry volume exists
  command: "{{ glusterfs_heketi_client }} volume list"
  register: registry_volume

- name: Create GlusterFS registry volume
  command: "{{ glusterfs_heketi_client }} volume create --size={{ openshift_hosted_registry_storage_volume_size | replace('Gi','') }} --name={{ openshift_hosted_registry_storage_glusterfs_path }}"
  when: 
    - "openshift_hosted_registry_storage_glusterfs_path not in registry_volume.stdout"
    - "openshift_hosted_registry_storage_class is not defined"