diff --git a/roles/gluster/client/templates/client.config b/roles/gluster/client/templates/client.config index 85cfccc5d5..6584efc924 100644 --- a/roles/gluster/client/templates/client.config +++ b/roles/gluster/client/templates/client.config @@ -2,23 +2,23 @@ # Generated by ansible {% for server in servers %} -volume vol-<%= servers.index(server) %> +volume vol-{{ servers.index(server) }} type protocol/client option transport-type tcp - option remote-host <%= server %> + option remote-host {{ server }} option transport.socket.nodelay on option remote-port 6996 option remote-subvolume iothreads - option username <%= username %> - option password <%= password %> + option username {{ username }} + option password {{ password }} end-volume {% endfor %} volume mirror-0 type cluster/replicate subvolumes {% for server in servers %}vol-#{{loop.index}} {% endfor %} - {% if servers.index(ansible_hostname) %} - option read-subvolume vol-{{ servers.index(ansible_hostname)}} + {% if servers.index(ansible_ssh_host) %} + option read-subvolume vol-{{ servers.index(ansible_ssh_host)}} {% endif %} end-volume