Include ansible-galaxy playbooks from another playbook

112 views
Skip to first unread message

Navid Paya

unread,
Oct 12, 2014, 11:38:29 PM10/12/14
to ansible...@googlegroups.com
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


Michael DeHaan

unread,
Oct 13, 2014, 4:57:59 PM10/13/14
to ansible...@googlegroups.com
"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!





--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/2bf1fccd-c0e6-44fc-b7c0-ce75f934faef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Navid Paya

unread,
Oct 14, 2014, 4:18:11 AM10/14/14
to ansible...@googlegroups.com
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 (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?

--
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/ENJwHLN4ioA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.

To post to this group, send email to ansible...@googlegroups.com.

Navid Paya

unread,
Oct 14, 2014, 8:37:04 AM10/14/14
to ansible...@googlegroups.com
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.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/ENJwHLN4ioA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages