It is recommended to pass the same variables (e.g. testing) to other
commands and playbooks, the new file makes it possible.
Change-Id: I2adc4e2dcfd8555b2c9e6c3bf0f512f603367091
https://review.opendev.org/#/c/742192/ added the creation of
symbolic link to Ansible Collections to env-setup.sh script
however it overlooked adding the symbolic link to .gitignore.
This change resolves this issue.
Change-Id: I5327b67d42b196c1e16d97ba562d1f7845ab407f
This change adds a local CLI ./bifrost-cli that allows to easily
run bifrost playbooks. It is targeting early adopters and thus
is opinionated and does not expose all possible options.
Only the very minimum is provided in this patch. More options
will be added later as we decide they are important.
Documentation will also be provided later as it's going to be
quite large. This feature should be considered technical preview
at this point until we give it more testing.
Change-Id: I2205e759431024124518716eccd07f79bda14f3a
Use stestr for tests.
Also clean tox.ini and add check for flake8 H106:
Don't put vim configuration in source files.
Change-Id: Ia76961a091688372c6df363d5e1dcb29ff0f39bf
This patch updates two exclude rules to .gitignore:
1. Exclude .idea directory created by some IDEs based
on IntelliJ.
2. Exclude .DS_Store generated by MacOS system.
Change-Id: If89c73f30c14fee5a92e21ee97a0545c6a1067d9
Instaling and using Ansible from source for bifrost has several
drawbacks, mainly due to how Ansible's 'ansible/hacking/env-setup'
script mangles with PATH and PYTHONPATH, which complicates running it as
part of other scripts. Besides, cloning the whole repo and it's
submodules is somewhat longer.
The main reason why we were doing that at all was a necessity to install
some additional Ansible modules from newer Ansible versions, which we
dropped right into the source of Ansible code - but this does not have to
be so.
Luckily for us, all Ansible versions we target to support can load
modules from 'library' directory next to playbooks/roles,
and we already use that for 'os_ironic_facts' module.
The need to install a particular module can be assessed by running
ad-hoc 'ansible' command against localhost with the module in question
and without any arguments ('ansible localhost -m <module>'):
- if the module is available in Ansible, the stderr will contain
"changed" substring (as part of the standard module output)
- if the module is absent form Ansible, "changed" string will be absent
from stderr too, in which case we can download the module from github
directly into 'playbooks/library' directory.
This patch removes possibility of installing Ansible from source, and
always installs a released Ansible version via pip.
If not installed into venv, Ansible will be installed in user's ~/.local
directory via 'pip install --user'.
The missing but needed modules are downloaded as described above.
Some level of backward compatibility is provided:
- when the ANSIBLE_GIT_BRANCH has form of 'stable-X.Y', the
env-setup.sh script will do the next best thing and install latest
available Ansible version of X.Y.w.z
Also, ANSIBLE_PIP_VERSION can now accept a full pip version specifier:
- if ANSIBLE_PIP_VERSION starts with a digit, this exact version will be
installed (as 'ansible==X.Y.W.Z')
- otherwize this whole variable is assigned as Ansible version specifier
for pip, e.g
env ANSIBLE_PIP_VERSION="<2.2" env-setup.sh
will result in pip being called as
pip install -U "ansible<2.2"
Closes-Bug: #1663562
Change-Id: I2c9f47abbbb6740d03978f684ad2c876749655b7
Since everyone is going to reno, why not bifrost as well.
Adds basic substrate for reno, which may be incorrect, however
that can be addressed as time goes on.
Change-Id: I36caf7682de56917be90bed14e290c5509c7fa86
Use cookiecutter (https://git.openstack.org/openstack-dev/cookiecutter)
to generate config for tox so we can generate docs, run pep8, etc.
Also move CONTRIBUTING.rst to the root of the repository in keeping
with what seems to be the standard location. This move allows us to
easily generate the docs. Also include a tiny fix to allow pep8 to
run cleanly.
Change-Id: Ifbfc6d85c7b02bf4ab989974b491a3a1ae6f0900