Fix some more jinja errors and use ansible_ssh_host over ansible_hostname.

This commit is contained in:
Ralph Bean 2014-02-07 21:58:33 +00:00
parent c983f6202b
commit ff73e633e8

View file

@ -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