
Commit 50c7edb9d8c5383303207026d30b4badc0c5f398 ("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
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.