Cannot create some accounts associated to a host inside an external inventory file

14 views
Skip to first unread message

Stefano Leandro

unread,
Feb 25, 2020, 5:23:39 PM2/25/20
to Ansible Development
Hi ,

Pratically im implementing this use case :

Passing a inventory file containing host and vars associated ,i would create a play that iterate for each linux acciunt to create per host

this is my inventory file format :

hostname1 account_name='john doe' user_name='jdoe' group_name='basic'
hostname1 account_name='robert key' user_name='rkey' group_name='basic'
hostname1 account_name='gin ice' user_name='gice' group_name='basic'



When i ran the playbook i can see only last row is executed.

Someone can suggest me how i have to write the playbook .... i tried with_items= "{{ user_name }}" but the result is the same.


Thank you ,

Reply all
Reply to author
Forward
0 new messages