Hello,
I have the following task for user management, that I'm trying to express
in ansible :
User data is in a *users* key (vars/users.yml)
Host group data is in a *host_groups* keys ( vars/groups.yml)
The users key contains the list of users and their data, e.g. :
users:
- name: test
- shell: /bin/bash
...
host_groups:
- nginx : test1, test2, test3
- db : test3
What I want to do is write a playbook to iterate over the *host_groups*,
get the list of users to add, and then use the *users* key to get the data
to add a user.
I have a* add_user.yml *task that takes a user + host to add the user to.
But to do this, I need something like :
tasks:
- include: add_user.yml user=item.user
with_items:
- host_groups
But I get a message that include+with_items is deprecated. How do I get the
above working? Or is there a better way to do this?
Thanks,
Raghu
--
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/4765cc00-822f-4e25-84f3-f82223783ef8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.