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 # Generated by ansible
{% for server in servers %} {% for server in servers %}
volume vol-<%= servers.index(server) %> volume vol-{{ servers.index(server) }}
type protocol/client type protocol/client
option transport-type tcp option transport-type tcp
option remote-host <%= server %> option remote-host {{ server }}
option transport.socket.nodelay on option transport.socket.nodelay on
option remote-port 6996 option remote-port 6996
option remote-subvolume iothreads option remote-subvolume iothreads
option username <%= username %> option username {{ username }}
option password <%= password %> option password {{ password }}
end-volume end-volume
{% endfor %} {% endfor %}
volume mirror-0 volume mirror-0
type cluster/replicate type cluster/replicate
subvolumes {% for server in servers %}vol-#{{loop.index}} {% endfor %} subvolumes {% for server in servers %}vol-#{{loop.index}} {% endfor %}
{% if servers.index(ansible_hostname) %} {% if servers.index(ansible_ssh_host) %}
option read-subvolume vol-{{ servers.index(ansible_hostname)}} option read-subvolume vol-{{ servers.index(ansible_ssh_host)}}
{% endif %} {% endif %}
end-volume end-volume