On Monday, 22 January 2018 16.35.25 CET Shaun Dolan wrote:
> Here is what I've tried (am I headed down the right path?):
> - name: create gluster volume
> gluster_volume:
> state: present
> name: gluster0
> bricks: /bricks/brick1/g1
> rebalance: yes
> replicas: yes
> cluster: |
> {% for host in play_hosts %}
> "- {{hostvars[host].ansible_default_ipv4.address}}"
> {% endfor %}
Since cluster takes a list try this
cluster: "{{ play_hosts | map('extract', hostvars, 'ansible_default_ipv4.address') | list }}"
--
Kai Stian Olstad