# Include ansible-galaxy playbooks from another playbook

**URL:** <https://forum.ansible.com/t/include-ansible-galaxy-playbooks-from-another-playbook/16489>\
**Category:** Ansible Project\
**Tags:** galaxy-ng\
**Created:** [October 13, 2014, 3:38am UTC](https://forum.ansible.com/t/include-ansible-galaxy-playbooks-from-another-playbook/16489 "2014-10-13T03:38:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Navid\_Paya](https://avatars.discourse-cdn.com/v4/letter/n/9fc29f/32.png) [@Navid\_Paya](https://forum.ansible.com/u/Navid_Paya)\
**Post date:** [October 13, 2014, 3:38am UTC](https://forum.ansible.com/t/include-ansible-galaxy-playbooks-from-another-playbook/16489/1 "2014-10-13T03:38:28Z")

</div>

Hi all  
I’m using an ansible-galaxy playbook. Right now I’m having it included using my site.yml file:

roles:

- nodesource.node
- base-ami

Now try to use an include statement in my role playbook but it raises an error since the playbook is an external one and not part of my playbook. Any way around that, like telling my playbook this is an ansible-galaxy playbook so don’t expect to see it in the directory structure?

- name: Include the nodesource.node playbook  
include: nodesource.node

---

<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:** [October 13, 2014, 8:57pm UTC](https://forum.ansible.com/t/include-ansible-galaxy-playbooks-from-another-playbook/16489/2 "2014-10-13T20:57:55Z")

</div>

“Now try to use an include statement in my role playbook”

I’m having a bit of difficulty following.

Galaxy is only a mechanism of downloading roles, not playbooks, so I’m currently understanding this to mean you seem to be requesting that roles that are not found are not an error?

Can you perhaps clarify?

Thanks!

---

<div class="post-metadata">

**Author:** ![Navid\_Paya](https://avatars.discourse-cdn.com/v4/letter/n/9fc29f/32.png) [@Navid\_Paya](https://forum.ansible.com/u/Navid_Paya)\
**Post date:** [October 14, 2014, 8:18am UTC](https://forum.ansible.com/t/include-ansible-galaxy-playbooks-from-another-playbook/16489/3 "2014-10-14T08:18:08Z")

</div>

Bad choice of wording. So I like what a role in galaxy does so I download. Now I want to override some of those role’s defaults. In the case of [this rbenv role](https://github.com/zzet/ansible-rbenv-role) (which is also available in galaxy), the version of Ruby it installs. If I include the role using my site.file it just installs that role with its default values.

- hosts: all  
user: ubuntu  
sudo: true

roles:

- base-ami
- nodesource.node
- rbenv
- rails

What’s the right way of doing that?

---

<div class="post-metadata">

**Author:** ![Navid\_Paya](https://avatars.discourse-cdn.com/v4/letter/n/9fc29f/32.png) [@Navid\_Paya](https://forum.ansible.com/u/Navid_Paya)\
**Post date:** [October 14, 2014, 12:37pm UTC](https://forum.ansible.com/t/include-ansible-galaxy-playbooks-from-another-playbook/16489/4 "2014-10-14T12:37:04Z")

</div>

OK. Just ignore this thread. I think I had an epiphany and figured what it is that I’m looking for. I’ll open another thread for it.
