# Runnig roles directly via ansible or ansible-playbook

**URL:** <https://forum.ansible.com/t/runnig-roles-directly-via-ansible-or-ansible-playbook/15607>\
**Category:** Ansible Project\
**Created:** [July 4, 2014, 7:15am UTC](https://forum.ansible.com/t/runnig-roles-directly-via-ansible-or-ansible-playbook/15607 "2014-07-04T07:15:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raghu\_Udiyar](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@Raghu\_Udiyar](https://forum.ansible.com/u/Raghu_Udiyar)\
**Post date:** [July 4, 2014, 7:15am UTC](https://forum.ansible.com/t/runnig-roles-directly-via-ansible-or-ansible-playbook/15607/1 "2014-07-04T07:15:14Z")

</div>

Hi,

When running roles on a set of machines, I end up writing a small playbook to specify the host pattern and roles to run. I was wondering instead of this, is there a easier method, so that this can be specified directly on command line.

For example

ansible all -r common -s

or if appropriate :

ansible-playbook all -r common, firewall

Advantages being, I don’t need to keep writing a small playbook to run a set of roles on a host pattern I already know.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [July 4, 2014, 12:27pm UTC](https://forum.ansible.com/t/runnig-roles-directly-via-ansible-or-ansible-playbook/15607/2 "2014-07-04T12:27:38Z")

</div>

No, there’s not.

The reason is often people will quickly need a series of options with ansible-playbook beyond the simple invocation you have above, and it’s important to track assignments of roles to particular hosts in source control.
