'{{ servers | map("regex_replace", "^(.*)$", ''"\1"'') | join(",") }}'
This does what you asked, but I doubt it's what you want. On Monday, April 10, 2023 at 6:51:26 AM UTC-4 mta...@gmail.com wrote: > im having bizarre issue > > having simple list > > servers: > - serverA > - serverB > > when using simple join > "{{ servers | join(',') }}" > i get: "serverA,serverB" > > what i actually need to get is a string like this > final: '("serverA","serverB")' > > i tried multiple ways on using join but i never get the string with each > element quoted > -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-devel/8ba6ef0c-4673-4b47-9d93-8138afa9a9ffn%40googlegroups.com.