Hi,
I am facing one issue here. I want to loop over the existing list using
with items and create another list using previous list values.
- name: collect iptables exception lines
set_fact:
exceptions: "{{ exceptions | union([ '-A INPUT -p tcp --source {{ item
}} --dport 3306 -j ACCEPT' ,
'-A INPUT -p
tcp --source {{ item }} --dport 4567 -j ACCEPT']) }}"
with_items: web_ips
When I run above playbook, i get err
fatal: [db_node1] => Failed to template {{ exceptions | union(['-A INPUT -p
tcp --source {{ item }} --dport 3306 -j ACCEPT','-A INPUT -p tcp --source
{{ item }} --dport 4567 -j ACCEPT') }}: an unexpected type error occurred.
Error was coercing to Unicode: need string or buffer, list found
my ansible version is 1.9.3.
--
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/82fa9788-98d3-4bb0-b350-bd255296089a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.