diff --git a/tests/inventory b/tests/inventory index a6eb73c4..ba414392 100644 --- a/tests/inventory +++ b/tests/inventory @@ -1,8 +1,8 @@ [all] -localhost ansible_connection=local ansible_become=True ansible_python_interpreter=ENVPYTHON +localhost ansible_connection=local ansible_become=True [cinder_volume] -localhost ansible_connection=local ansible_become=True ansible_python_interpreter=ENVPYTHON +localhost ansible_connection=local ansible_become=True [cinder_all] -localhost ansible_connection=local ansible_become=True ansible_python_interpreter=ENVPYTHON +localhost ansible_connection=local ansible_become=True diff --git a/tox.ini b/tox.ini index a5fdf08e..d55c1cb5 100644 --- a/tox.ini +++ b/tox.ini @@ -15,8 +15,6 @@ whitelist_externals = bash git rm - ln - sed setenv = VIRTUAL_ENV={envdir} ANSIBLE_HOST_KEY_CHECKING = False @@ -108,17 +106,6 @@ commands = [testenv:functional] commands = rm -rf {homedir}/.ansible - # Ansible is run using python in the tox venv, which doesn't have python-apt in it. - # Installing python-apt is non-trivial at first glance so for now we just symlink - # these in from the host. - ln -snf /usr/lib/python2.7/dist-packages/apt/ {envsitepackagesdir}/apt - ln -snf /usr/lib/python2.7/dist-packages/aptsources/ {envsitepackagesdir}/aptsources - ln -snf /usr/lib/python2.7/dist-packages/apt_pkg.so {envsitepackagesdir}/apt_pkg.so - ln -snf /usr/lib/python2.7/dist-packages/apt_inst.so {envsitepackagesdir}/apt_inst.so - # This forces Ansible to use the venv interpreter for localhost, which means we don't - # run into issues where things are being installed into the venv but then Ansible - # complains that it doesn't exist in /usr/local/lib. - sed -i 's@ENVPYTHON@{envpython}@g' tests/inventory git clone https://git.openstack.org/openstack/openstack-ansible-plugins \ {homedir}/.ansible/plugins ansible-galaxy install \