Restrictive jinja disallowed "len()"

This commit is contained in:
Ralph Bean 2014-02-07 21:55:47 +00:00
parent f38b34d8c4
commit c983f6202b

View file

@ -16,7 +16,7 @@ end-volume
volume mirror-0
type cluster/replicate
subvolumes {% for i in range(len(servers)) %}vol-#{{i}} {% endfor %}
subvolumes {% for server in servers %}vol-#{{loop.index}} {% endfor %}
{% if servers.index(ansible_hostname) %}
option read-subvolume vol-{{ servers.index(ansible_hostname)}}
{% endif %}