# Adding role-file to ansible-playbook

**URL:** <https://forum.ansible.com/t/adding-role-file-to-ansible-playbook/25430>\
**Category:** Ansible Project\
**Tags:** galaxy-ng\
**Created:** [September 7, 2017, 3:46pm UTC](https://forum.ansible.com/t/adding-role-file-to-ansible-playbook/25430 "2017-09-07T15:46:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thurston\_Stone](https://avatars.discourse-cdn.com/v4/letter/t/f19dbf/32.png) [@Thurston\_Stone](https://forum.ansible.com/u/Thurston_Stone)\
**Post date:** [September 7, 2017, 3:46pm UTC](https://forum.ansible.com/t/adding-role-file-to-ansible-playbook/25430/1 "2017-09-07T15:46:00Z")

</div>

Since a role file is a great way to download modules from git or galaxy, I was wondering if it made sense to put the role-file option in ansible-playbook?

So, rather than:  
ansible-galaxy install -r role\_file.yml -p path/to/roles  
ansible-playbook mainPlaybook.yml

it could be simplified to:  
ansible-playbook -r role\_file.yml -p path/to/roles mainPlaybook.yml

Besides being more concise and, therefore, readable, there is an added benefit of any errors being handled by one call, rather than run galaxy, check errors, do the necessary, run playbook, check errors, do the necessary.

I have forked to the repository with a straight-forward change to support this, but I wanted to inquire if it made sense to the design of ansible:  
[https://github.com/tstone2077/ansible/commit/231e2241fca96d2693dd3dbd73883dcec459c248](https://github.com/tstone2077/ansible/commit/231e2241fca96d2693dd3dbd73883dcec459c248)

Thanks,  
Thurston
