I have a template that does the following to sudoers:
{% for a in cde_admins %}
User_Alias CDEADMIN = {{ a }}
{% endfor %}
And I have the variables defined:
cde_admins:
- foo
- bar
I am looking for a way that I can iterate through the loop and add a ,
after foo. So it basically would look like this when i run Ansible:
User_Alias CDEADMIN = foo, bar
I've tried a few things like adding a join(",")
to the Jinja2 syntax but all that does is:
User_Alias CDEADMIN = f,o,o
User_Alias CDEADMIN = b,a,r
Can someone point in the right direction to make it so it just adds a comma to the end of foo
?