Hi Willard,
Keeping information in one place, is there a reason why you cannot change
it_users to be dictionaries?
it_users:
- { name: bill, uid: 501, passwd: hash, home: /home/bill }
- { name: fred, uid: 501, ... }
- { name: sam, ... }
Now you can access these items in the user module or elsewhere like this:
- user: name={{ item.name }} home={{ item.home }} password={{ item.passwd }}
with_items: it_staff
Regards,
-Tore
On Friday, November 14, 2014 6:09:48 PM UTC+1, Willard Dennis wrote:
>
> Hi all,
>
> I have some role variables currently that are single-level, for example a
> list of IT users:
>
> # Members of the IT Dept.
> it_users:
> - bill
> - fred
> - sam
>
> Now, for another role I'm defining, I'll need to include some data for
> each user, such as UID, password hash, homedir path, so I can properly set
> up local accts via the user module. How do I properly define attributes for
> each user, and then pull them in to the arguments of the user module?
>
> Thanks,
> Will
>
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/1b26d61f-e493-4806-9766-3ec34159d264%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.