openstack-ansible/osa_toolkit
Nolan Brubaker ea6954f72f Use python import machinery for inventory code
Change Idb7780f55e4a1fd77dd76becbf67c1ccbf220db7 restructured the python
inventory generation code so that it would be possible to install it
with pip. This change removes (most) of the import path hacks and
switches to using a pip-installed version of osa_toolkit.

Of note, the path hacks are left in place for the dynamic_inventory.py
file for now, as that file is really more of an endpoint, but is tested.

Also, the bootstrap-ansible.sh script was modified to install the code;
this is unnecessary with the tox environments because the tox directive
'usedevelop=True' does that already. Production environments still need
this, though.

Finally, to maintain usability when called directly, the interpreter for
dynamic_inventory.py was updated from `/usr/bin/env` to
`/opt/ansible-runime/python`. This change ensures that in a full
deployment the user is using the exact same code paths whether Ansible
invokes the script, or it is called directly. This also means that using
the script locally on a development machine, it must be invoked as an
argument to Python, unless the ansible-runtime directory exists.

Change-Id: Iafa573b1b144f98528d5e0aceb3f36e9de2a22a2
2017-07-28 16:39:52 +00:00
..
__init__.py Restructure lib directory to install via pip 2017-03-30 10:19:01 -04:00
dictutils.py Improve compatibiliity with Python 3 2017-06-06 10:44:13 -04:00
filesystem.py Use python import machinery for inventory code 2017-07-28 16:39:52 +00:00
generate.py Use python import machinery for inventory code 2017-07-28 16:39:52 +00:00
ip.py Improve compatibiliity with Python 3 2017-06-06 10:44:13 -04:00
manage.py Improve compatibiliity with Python 3 2017-06-06 10:44:13 -04:00
tools.py Restructure lib directory to install via pip 2017-03-30 10:19:01 -04:00