bifrost/scripts
Markos Chandras 7417619eaa scripts: Use ansible_python_interpreter on localhost
Commit 50c7edb9d8 ("Only install
libvirt-python and python-lxml via pip") added support for installing
libvirt-python and lxml on the virtualenv but this leads to problem like
the following one when executing all the virt_* modules.

The `libvirt` module is not importable. Check the requirements.

The problem is that libvirt-python and python-lxml are installed in the
virtualenv, but when Ansible operates on localhost, the default
interpreter is /usr/bin/python. As such, it's unable to find the
necessary requirements for all the virt_* Ansible modules. In order to
fix that, we need to pass the correct Ansible python interpreter when
operating on localhost.

Since we now pass the venv interp to Ansible, we also need to have
python-apt in the virtualenv in order to be able to use the 'apt'
module. However, in [1] it's clear that python-apt can't be installed in
a virtualenv so we have no other option than switching the ansible
python interpreter back to the host one for the tasks which need the
'apt' module.

fatal: [127.0.0.1]: FAILED! => {"changed": false, "msg": "Could not
import python modules: apt, apt_pkg. Please install python-apt
package."}

[1]: https://github.com/ansible/ansible/issues/14468
Change-Id: I59949b0ff821aac1767f56844082c2e8a32035f6
2018-05-22 10:54:55 +01:00
..
ansible-pip-str.py Fix ansible-pip-version.py script 2017-02-14 16:25:34 +02:00
collect-test-info.sh Collect ironic-inspector logs 2018-02-13 12:35:41 +00:00
env-setup.sh Bump ansible version to latest stable 2017-10-30 11:16:57 +01:00
install-deps.sh upgrade setuptools before installing package requirements 2018-05-13 15:26:09 -05:00
README.md Unify testing scripts 2016-06-01 10:42:28 -07:00
split_json.py Use JSON baremetal data in testing 2017-03-06 17:06:30 +02:00
test-bifrost-build-images.sh Unify testing scripts 2016-06-01 10:42:28 -07:00
test-bifrost-inventory-dhcp.sh Unify testing scripts 2016-06-01 10:42:28 -07:00
test-bifrost-keystone-auth.sh Add test script for Bifrost using keystone 2016-12-02 18:33:05 +00:00
test-bifrost-venv.sh Unify testing scripts 2016-06-01 10:42:28 -07:00
test-bifrost.sh scripts: Use ansible_python_interpreter on localhost 2018-05-22 10:54:55 +01:00

Scripts

This directory contains several scripts used in the OpenStack CI environment for CI testing of Bifrost, or CI testing that uses Bifrost to test other projects.

The env-setup.sh script is often used to install initial dependencies. These are generally not intended for use outside of the OpenStack CI environment (or similar).

test-bifrost-build-image.sh, test-bifrost-venv.sh, and test-bifrost-inventory-dhcp.sh are symlinks to test-bifrost.sh intended to provide backwards compatibility now that all functionality has been moved to test-bifrost.sh.