On 20.04.2018 12:33, Nico wrote:
I need to create a loop that puts the list into a string.
- set_fact:
foo: "{{ item }}:8080"
with_items: "{{ ip_list }}"
Does anybody know how to do this?
- set_fact:
foo: '{% for i in ip %}{{ i }}:8080{% if not loop.last %},{% endif
%}{% endfor %}'
--
Kai Stian Olstad
--
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/3f2e54dbea88e85486d0860e0a7664d8%40olstad.com.
For more options, visit https://groups.google.com/d/optout.