I think list is now a filter so perhaps try without the () on the end of
list
Not sure you can have {{ }} inside other {{ }} so maybe needs breaking into
two parts, set_fact to get the list of regex replaced play hosts and then
looking up the address from hostvars as a second step.
Hope that helps.
Jon
On Monday, September 14, 2015 at 2:59:37 PM UTC+1, Frank Tamás wrote:
>
> Hi,
>
> I need a list with the ip address of play_hosts. This template worked with
> 1.6.5, but it does not work with 1.9.3. I would appreciate any help, what
> could be wrong.
>
> ---
> - hosts: test
>
> vars:
> galera_cluster_members: "{{ play_hosts|map('regex_replace','(.*)',
> \"{{ hostvars['\\\\1']['ansible_eth0']['ipv4']['address'] }}\")|list() }}"
>
> tasks:
> - name: register members
> debug:
> msg: "{{ galera_cluster_members }}"
>
>
> Ansible: 1.9.3
> Jinja: 2.7.2
>
>
> thanks,
> Tamas
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/4a60097e-22a1-4a3b-80d7-34936d271e45%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.