Jinja and yaml are fun together

This commit is contained in:
Pierre-Yves Chibon 2014-02-07 23:25:16 +01:00
parent 06990b2234
commit 280c773ae7

View file

@ -17,10 +17,9 @@ end-volume
volume mirror-0
type cluster/replicate
subvolumes {% for server in servers %}vol-#{{loop.index}} {% endfor %}
{% if servers.index(inventory_hostname) %}
option read-subvolume vol-{{ servers.index(inventory_hostname)}}
{% endif %}
option read-subvolume vol-{{ servers.index(inventory_hostname)}}{% endif %}
end-volume
volume writebehind