Yes, you can pass variables to roles.

Search for "parameterize" on this page -
http://docs.ansible.com/playbooks_roles.html#roles

Though I think you should move your vars to defaults/main.yml instead, if
you are doing that -- or even consider requiring the list to be passed each
time.




On Wed, May 14, 2014 at 4:54 PM, Francisco Reyes <[email protected]>wrote:

> I have a role that sets up "admin users".. On both FreeBSD and Ubuntu.
>
> I would like to expand that role to use it for other users as needed.
>
> Is there a way to over-ride the vars/main.yml file with a different list
> on a playbook by playbook bases?
>
> So I can create one playbook per user and then limit to what server it is
> run against.
>
> In summary..
> Existing
> Have a role that adds admins
>
> Desired
> Want to reuse the users role to add other users to specific machines using
> the users role.
>
> --
> 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/2cb412a0-0dca-487f-992f-f60ce8a11dd6%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/2cb412a0-0dca-487f-992f-f60ce8a11dd6%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CA%2BnsWgx13%3DavXUh%2Bg%3DoVhLhT992vZaHTouAenb_VetpwNCXOww%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to