user specific yml file

34 views
Skip to first unread message

rob

unread,
May 6, 2014, 3:59:28 PM5/6/14
to ansible...@googlegroups.com
Hi

I have vars with system users defined:

---
users:
  - username: user1
    hash: hash1
    uid: uid1
  - username: user2
    hash: hash2
    uid: uid2

Additionally every user has his own set of tasks in the yml file to configure his own environment e.g. change .bashrc, .bash_aliases, .vimrc etc.

The easiest way would be to iterate users via with_items and include user specific yml file but since "include + with_items is a removed deprecated feature" it is not possible. So what is the easiest way to acomplish that?

Maybe you've done something similar?

Michael DeHaan

unread,
May 9, 2014, 8:09:04 PM5/9/14
to ansible...@googlegroups.com
This is not directly possible.   You could consider code generating the top-level playbook, however.







--
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/62b2e77b-4a5f-4e65-b8fe-9673515efb8a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages