On 20.04.2018 13:00, Kai Stian Olstad wrote:
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 %}'
It should be {% for i in ip_list %}
--
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/3a9e1e384a80cef3423a39b572c4c36c%40olstad.com.
For more options, visit https://groups.google.com/d/optout.