# ansible-galaxy bundler

**URL:** <https://forum.ansible.com/t/ansible-galaxy-bundler/14759>\
**Category:** Ansible Developer\
**Tags:** galaxy-ng\
**Created:** [March 12, 2014, 9:09am UTC](https://forum.ansible.com/t/ansible-galaxy-bundler/14759 "2014-03-12T09:09:16Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShadowKoBolt](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@ShadowKoBolt](https://forum.ansible.com/u/ShadowKoBolt)\
**Post date:** [March 12, 2014, 9:09am UTC](https://forum.ansible.com/t/ansible-galaxy-bundler/14759/1 "2014-03-12T09:09:16Z")

</div>

Quick question and very sorry if this has already been asked or discussed (I had a quick search but couldn’t find anything). Does anyone know if there are any plans to add the functionality to automatically install any missing roles detected, so when a role is not found in the roles\_path or relative directory to search ansible-galaxy? E.g. instead of having to provision, see roles are missing, run ansible-galaxy install XX provision again, see another missing role, and repeat until all roles are installed being able to just run a ansible-galaxy install-missing or some such which checks ansible-galaxy when a missing role in detected and automatically installs.

Thanks for any feedback

---

<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:** [March 12, 2014, 12:47pm UTC](https://forum.ansible.com/t/ansible-galaxy-bundler/14759/2 "2014-03-12T12:47:04Z")

</div>

So the galaxy CLI will install dependencies.

But it is not true that Ansible will auto fetch them, this is a manual step.

You can make a requirements file (list one role per line, and optionally a comma and the version string) and feed that to the ansible-galaxy CLI.

---

<div class="post-metadata">

**Author:** ![Jonathan\_Sabo1](https://avatars.discourse-cdn.com/v4/letter/j/839c29/32.png) [@Jonathan\_Sabo1](https://forum.ansible.com/u/Jonathan_Sabo1)\
**Post date:** [March 12, 2014, 12:55pm UTC](https://forum.ansible.com/t/ansible-galaxy-bundler/14759/3 "2014-03-12T12:55:28Z")

</div>

Two of the settings required to use the requirements file are the api server and a public github. I would like to be able to use the requirements file functionality from inside closed networks. Can this work without an api server or can an api server be made available inside a network without internet connectivity? We could patch ansible-galaxy to allow us to supply the url for the github instance. Thoughts?

---

<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:** [March 12, 2014, 1:01pm UTC](https://forum.ansible.com/t/ansible-galaxy-bundler/14759/4 "2014-03-12T13:01:32Z")

</div>

There is no private galaxy instance available at this time.

I’d be totally open to an option to make it also work off of a mount location, which probably provides the easiest solution.

---

<div class="post-metadata">

**Author:** ![Jonathan\_Sabo1](https://avatars.discourse-cdn.com/v4/letter/j/839c29/32.png) [@Jonathan\_Sabo1](https://forum.ansible.com/u/Jonathan_Sabo1)\
**Post date:** [March 12, 2014, 1:05pm UTC](https://forum.ansible.com/t/ansible-galaxy-bundler/14759/5 "2014-03-12T13:05:43Z")

</div>

Can you explain what you mean by working off a mount location? I would assume that most people like us either have an internal github or another git instance where they store their ansible roles. I definitely want to keep my code in github and be able to reference it from the requirements file. As these repos are internal and not meant to be shared there’s really not a reason for us to use an internal ansible-galaxy. Having one would be great but we really just want to be able to reference things in github and pull them down from the requirements file.

---

<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:** [March 12, 2014, 1:41pm UTC](https://forum.ansible.com/t/ansible-galaxy-bundler/14759/6 "2014-03-12T13:41:27Z")

</div>

I mean being able to install things from the local filesystem.

If you want to make it take git URLs too, that’s great.

I mean we’re not going to build a installable galaxy server _yet_.

---

<div class="post-metadata">

**Author:** ![Jonathan\_Sabo1](https://avatars.discourse-cdn.com/v4/letter/j/839c29/32.png) [@Jonathan\_Sabo1](https://forum.ansible.com/u/Jonathan_Sabo1)\
**Post date:** [March 12, 2014, 2:01pm UTC](https://forum.ansible.com/t/ansible-galaxy-bundler/14759/7 "2014-03-12T14:01:53Z")

</div>

Yeah I don’t think that’s something I would use. I keep my code in github and I just want a way to make a list of remote repositories that contain ansible roles and pull them down. Some of those remote repositories aren’t hosted on the [www.github.com](http://www.github.com) site. They’re in private instances of github behind firewalls. I could use git subtrees or submodules but what I would like to be able to do is use ansible-galaxy -r somefile and have it work. Would you accept a patch that made the api-server optional (basically saying we don’t want to use the role sharing social stuff you have going on because we’re behind some firewalls and cant) and the github url a parameter which would allow us to use internal githubs? Are there better ideas? Maybe I’m not understanding what how you envision getting code from githubs to the localfile system. All I want to do is type ansible-galaxy -r filename and hit enter.

---

<div class="post-metadata">

**Author:** ![Jeff\_Geerling](https://avatars.discourse-cdn.com/v4/letter/j/13edae/32.png) [@Jeff\_Geerling](https://forum.ansible.com/u/Jeff_Geerling)\
**Post date:** [March 13, 2014, 3:53am UTC](https://forum.ansible.com/t/ansible-galaxy-bundler/14759/8 "2014-03-13T03:53:31Z")

</div>

I tried installing a role (geerlingguy.drush) with a dependency on another role (geerlingguy.php, geerlingguy.composer), but the dependencies weren’t downloaded; is there anything in particular I’m missing?

I was going to ask this same question (how to get the ansible-galaxy command to download dependencies), but am wondering if I’m going about it the wrong way.

I just used the command “ansible-galaxy install geerlingguy.drush”, and only the .drush role was downloaded.

---

<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:** [March 13, 2014, 12:01pm UTC](https://forum.ansible.com/t/ansible-galaxy-bundler/14759/9 "2014-03-13T12:01:20Z")

</div>

We’d probably need to see the role’s meta.yml, or perhaps you had updated the file on github and needed to hit the “update” button in Galaxy to suck in the new metadata.

Let us know!

---

<div class="post-metadata">

**Author:** ![Jeff\_Geerling](https://avatars.discourse-cdn.com/v4/letter/j/13edae/32.png) [@Jeff\_Geerling](https://forum.ansible.com/u/Jeff_Geerling)\
**Post date:** [March 13, 2014, 12:24pm UTC](https://forum.ansible.com/t/ansible-galaxy-bundler/14759/10 "2014-03-13T12:24:56Z")

</div>

Here’s the role: [https://galaxy.ansible.com/list#/roles/433](https://galaxy.ansible.com/list#/roles/433)

And here’s meta/main.yml: [https://github.com/geerlingguy/ansible-role-drush/blob/master/meta/main.yml](https://github.com/geerlingguy/ansible-role-drush/blob/master/meta/main.yml)

Pasted here:

```auto

---
dependencies:
  - { role: geerlingguy.git }
  - { role: geerlingguy.php }
  - { role: geerlingguy.composer }

galaxy_info:
  author: geerlingguy
  description: Drush - command line shell for Drupal
  company: "Midwestern Mac, LLC"
  license: "license (BSD, MIT)"
  min_ansible_version: 1.4
  platforms:
  - name: EL
    versions:
    - all
...

```

---

<div class="post-metadata">

**Author:** ![James\_Cammarata](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@James\_Cammarata](https://forum.ansible.com/u/James_Cammarata)\
**Post date:** [March 13, 2014, 1:56pm UTC](https://forum.ansible.com/t/ansible-galaxy-bundler/14759/11 "2014-03-13T13:56:51Z")

</div>

Thanks, I’ll take a look at this today.
