I have ansbile inv
# cat inv
[all]
vm1
vm2
I want to extract them in a comma delimited list using Jinja template
so I add jinja template
# cat comb_list.j2
{{ groups['all'] | map('extract', hostvars, ['item']) | join(',') }}"
but I guess item is not a hostvars, so throws error
I want end file to look like this
# cat comb_list
vm1,vm2