Fix some more jinja errors and use ansible_ssh_host over ansible_hostname.
This commit is contained in:
parent
c983f6202b
commit
ff73e633e8
1 changed files with 6 additions and 6 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue