Browse Source

hosted registry: Use proper node name in GlusterFS storage setup

Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
Jose A. Rivera 7 years ago
parent
commit
85093de27f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      roles/openshift_hosted/tasks/registry/storage/glusterfs.yml

+ 1 - 1
roles/openshift_hosted/tasks/registry/storage/glusterfs.yml

@@ -35,7 +35,7 @@
   mount:
     state: mounted
     fstype: glusterfs
-    src: "{% if 'glusterfs_registry' in groups %}{{ groups.glusterfs_registry[0] }}{% else %}{{ groups.glusterfs[0] }}{% endif %}:/{{ openshift.hosted.registry.storage.glusterfs.path }}"
+    src: "{% if 'glusterfs_registry' in groups %}{% set node = groups.glusterfs_registry[0] %}{% else %}{% set node = groups.glusterfs[0] %}{% endif %}{% if 'glusterfs_hostname' in hostvars[node] %}{{ hostvars[node].glusterfs_hostname }}{% elif 'openshift' in hostvars[node] %}{{ hostvars[node].openshift.node.nodename }}{% else %}{{ node }}{% endif %}:/{{ openshift.hosted.registry.storage.glusterfs.path }}"
     name: "{{ mktemp.stdout }}"
 
 - name: Set registry volume permissions