# Making it easier to get submodules

**URL:** <https://forum.ansible.com/t/making-it-easier-to-get-submodules/16867>\
**Category:** Ansible Project\
**Created:** [November 25, 2014, 12:51am UTC](https://forum.ansible.com/t/making-it-easier-to-get-submodules/16867 "2014-11-25T00:51:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marc\_Abramowitz](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@Marc\_Abramowitz](https://forum.ansible.com/u/Marc_Abramowitz)\
**Post date:** [November 25, 2014, 12:51am UTC](https://forum.ansible.com/t/making-it-easier-to-get-submodules/16867/1 "2014-11-25T00:51:54Z")

</div>

So I had a slight hiccup the other day when I tried to contribute to ansible. I have contributed in the past, but it was before the ansible modules were split out into separate “core” and “extras” git repos.

So when I tried to run the tests, I was missing the proper git submodules.

My attempt at making this easier for people who want to contribute:

[https://github.com/ansible/ansible/pull/9597](https://github.com/ansible/ansible/pull/9597)

Serge raised some concerns about it possibly hurting some other workflows, which I hopefully handled, but it would be good to get more eyes on it.

To be honest, I’m not sure that `hacking/env-setup` is the right place to add this, but this is pirobably because in my ideal world, there would be no `hacking/env-setup` in the first place. I would love to just create a virtualenv and do `pip install -e .`. Last time I tried this, it didn’t work because ansible was installing modules globally in /usr/share and such. But I noticed that there were a lot of changes in how stuff is organized since then, so it might be possible now out of the box or perhaps with a little work. If that were true, then I wouldn’t need `hacking/env-setup`, but I would still need something to initialize the git submodules. So perhaps there’s some other place where that can be done?

Marc

---

<div class="post-metadata">

**Author:** ![James\_Martin1](https://avatars.discourse-cdn.com/v4/letter/j/0ea827/32.png) [@James\_Martin1](https://forum.ansible.com/u/James_Martin1)\
**Post date:** [November 25, 2014, 2:36am UTC](https://forum.ansible.com/t/making-it-easier-to-get-submodules/16867/2 "2014-11-25T02:36:19Z")

</div>

Marc,

Can you post this on the ansible-devel list?

Thanks,

James

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [November 25, 2014, 2:37am UTC](https://forum.ansible.com/t/making-it-easier-to-get-submodules/16867/3 "2014-11-25T02:37:31Z")

</div>

Honestly, I don’t like the change. For me env-setup is not meant to setup ansible itself, it is just a shortcut to setting the environment vars to run Ansible from a git clone.

If you are running from source and using env-setup you should know how to handle the submodules.

This would actually break my work flow, since I am typically using this for developing ansible itself (including modules). As such I don’t typically have the submodules cloned. I have an extra step in my work flow to fetch and merge the module repos into my own and add their paths to ANSIBLE\_LIBRARY (this env var is set using postactivate from virtualenvwrappers).

I think fixing pip -e would be a good place to start. It largely does work but there are some PYTHONPATH issues that still linger. See [https://github.com/ansible/ansible/issues/7092](https://github.com/ansible/ansible/issues/7092)

I not sure with -e, but pip typically handles the submodule stuff itself without issues.
