Have a look at tags. Tag the role includes in the playbook, and then just pass the appropriate tags to ansible-playbook
http://docs.ansible.com/playbooks_roles.html#id6 Will On Wednesday, September 24, 2014 9:29:34 AM UTC+10, Sankalp Khare wrote: > > Hi, > > I often come across the situation where I need to apply some roles X,Y,Z > on a bunch of machines. How do I do that without having to edit the list of > roles in a playbook? In other words, could there be something of the type : > > $ ansible-playbook -i <inven> role-applier.yml --extra-vars > 'roles=["X","Y","Z"]' > > Thanks, > Sankalp > -- 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/ee0470d0-5cbb-42a0-a95e-4ae5a2ee74ae%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
