diff options
| author | Ralph Bean <rbean@redhat.com> | 2014-02-07 22:02:16 +0000 |
|---|---|---|
| committer | Ralph Bean <rbean@redhat.com> | 2014-02-07 22:02:16 +0000 |
| commit | 75799a5f32115c698543493f1bdf6ff19f53491f (patch) | |
| tree | 56c0973ae423e56edbc530289bcd1562e0f2fe93 /roles/gluster/client | |
| parent | ff73e633e8d65ca8a1171a402b1300c90530f08c (diff) | |
| download | ansible-75799a5f32115c698543493f1bdf6ff19f53491f.tar.gz ansible-75799a5f32115c698543493f1bdf6ff19f53491f.tar.xz ansible-75799a5f32115c698543493f1bdf6ff19f53491f.zip | |
Use some hostvars trickery.
Diffstat (limited to 'roles/gluster/client')
| -rw-r--r-- | roles/gluster/client/templates/client.config | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/roles/gluster/client/templates/client.config b/roles/gluster/client/templates/client.config index 6584efc92..430964208 100644 --- a/roles/gluster/client/templates/client.config +++ b/roles/gluster/client/templates/client.config @@ -17,8 +17,8 @@ end-volume volume mirror-0 type cluster/replicate subvolumes {% for server in servers %}vol-#{{loop.index}} {% endfor %} - {% if servers.index(ansible_ssh_host) %} - option read-subvolume vol-{{ servers.index(ansible_ssh_host)}} + {% if servers.index(hostvars[inventory_hostname]['ansible_ssh_host']) %} + option read-subvolume vol-{{ servers.index(hostvars[inventory_hostname]['ansible_ssh_host'])}} {% endif %} end-volume |
