--- - hosts: localhost remote_user: root vars: users: - name: Andrew - name: Doug - name: Paul - name: ipphone tasks: - debug: var=users
- name: test template: src=../templates/test.j2 dest=/home/root/test.cfg
define contactgroup{ contactgroup_name Admins alias Seamless_internal_admins members {{ users.name }}}define contactgroup{ contactgroup_name JAPS alias Seamless_internal_admins members Doug
}define contactgroup{ contactgroup_name JAPS alias Seamless_internal_admins members Andrew,Doug,Paul,ipphone
}--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/2ce4fa5b-80e9-4e33-915b-7f1361027eb2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
define contactgroup{
contactgroup_name Admins
alias
Seamless_internal_admins
members {{ users[0].name
}}{% for user in users[1:] %},{{ user.name }}{% endfor
%}
}