Include is deprecated, additionally include_tasks is now faster.
Signed-off-by: Kevin Carter <kevin@cloudnull.com>
Change-Id: I20f92b972b794513cb774983f3aa6044769987d7
ansible_python_interpreter is now set to auto in the tests repo.
it doesn't need to be overwritten in the test anymore.
Depends-On: https://review.opendev.org/734676/
Change-Id: I73c3c12fe937cda95455dcd5cd708d03a316b392
Caching git repositories has been deprecated in Queens, so it's high time
we removed this functionality.
This shouldn't influece OSA deployments in any way.
Change-Id: I35829aa35489f06dbb3b65f522f0a08318eccbfa
The connection plugin no longer falls back on using the
inventory_hostname as the container_name. Set container_name as a host
var for each container in the test inventory.
Change-Id: I68e5fd1b893bf716f6cfc08d80a36fbb07f635f7
The repo container's package cache causes quite a bit of confusion
given that it's a 'hidden' feature which catches deployers off-guard
when they already have their own cache configured. This is really
the kind of service which people should manage outside of OSA. It
also makes no sense if the deployer is using their own local mirror
which is a fairly common practise. Adding to that, it seems that it
is broken in bionic, causing massive delays in package installs.
Finally, it also adds to quite a bit of complexity due to the fact
that it's in a container - so in the playbooks prior to the container's
existence we have to detect whether it's there and add/remove the config
accordingly.
Let's just remove it and let deployers managing their own caching
infrastructure if they want it.
Change-Id: I829b9cfa16fbd1f9f4d33b5943f1e46623e1b157
With the more recent versions of ansible, we should now use
"is" instead of the "|" sign for the tests.
This should fix it.
Change-Id: Ib73373d8801c9eedd7c6e92b994a2fba0349ed90
Now that run_tests.sh handles the tests repo clone, we can
remove the use of the older tests-repo-clone.sh script.
Change-Id: I433be60aac36892e5a4d6c4fd61755d6b1b4eac4
With the merge of https://review.openstack.org/520177 in the
tests repo some ansible-lint failures which previously were
not being picked up are now detected.
This adds the appropriate skip tags to the tasks so that they
are not evaluated by ansible-lint.
Change-Id: I5a45388aa57ac061fab62271ecea28804713cbc9
This patch implements an initial set of jobs intended to match
the current job execution method. It does not intend to improve
how the jobs are executed - only to replicate what is currently
in openstack-infra/openstack-zuul-jobs and provide the platform
to iterate on.
Change-Id: Ifa650996eb87c6519ea3dfc449ebde92a8d7802d
Add support for SUSE based distributions. We also update the bindep.txt,
run_tests.sh, .gitignore, tests-repo-clone.sh and Vagrantfile files
from the openstack-ansible-tests repository.
Change-Id: I5a2b3cae0ed325abb3920e9a684d25898df6027d
'ansible_become' defined as a host_var or in the inventory for a host
has a higher precedence than 'become' defined within a playbook.
In change Id5b76a87809f03951c954fc3d752419a673403f7, 'become' was
defined explicitly for each play running against localhost so
'ansible_become' should be removed from its host_vars.
Change-Id: Ic74099b95342a938c77c08305230aeb711741b76
Cc: Jimmy McCrory <jimmy.mccrory@gmail.com>
When executing the tests repo clone in OpenStack-CI,
use zuul-cloner instead of git to enable cross-repo
testing. This ensures that if a dependent patch from
the tests repo is noted using 'Depends-On: <change-id>'
in the commit message, that patch will be included.
Change-Id: I0ff409dd48649e999e36775d712e2609715115b0
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
Move test host vars from the inventory to individual files for each
host. 'ansible_become' has been removed from localhost's vars since it
should be handled on a playbook basis. The containers' management
addresses have also been moved to the br-mgmt bridge.
Change-Id: Ib1c08d7df0d1be855ca9579faa3a2ad85b164e0d
The repo_server role does no pip installations - they're all done
in the repo_build role.
This removes the unnecessary dependency.
Note that the httplib2 pip install task is removed as Ansible 2.x
no longer requires it.
Related-Bug: #1633105
Change-Id: I4a2ff6c6e5cd40d87d4218f63c09e96da82da1aa
This patch consumes the test scripts implemented by
https://review.openstack.org/375061 to ensure that
the tests and test preparation is consistent and
more maintainable.
Change-Id: I8d80c9d34b018ec73b2517256d7b62dbb2e2609a
Ansible 2.1.1 introduces a regression in the way conditional
includes are handled which results in every task in the
included file being evaluated even if the condition for the
include is not met. This extends the run time significantly
for a deployment.
This patch forces all conditional includes to be dynamic.
Change-Id: I66de661bf9f68a2d91e3a2fec9c1eee826c17592
Related-Bug: https://github.com/ansible/ansible/issues/17687
Separate files have been created for vars and tasks related to a
specific package manager.
The 'repo_apt_packages' variable has been deprecated and renamed to
the more generalized 'repo_server_packages' to better describe its
purpose and to simplify reuse of existing install tasks between multiple
distros.
git daemon is configured to host git repositories from the repo servers
using the git protocol.
Currently, openstack-ansible uses git over http to access repositories
on servers created by this role.
fcgiwrap and its configuration within nginx should be removed in a
follow-up patch after openstack-ansible has been updated to use the git
protocol.
Change-Id: I62321a7b62dabca469eb072ddbf4e8f250ce0fb3
The following changes have been made to reorganize the structure of this
role's test playbooks, bringing them into line with other
OpenStack-Ansible roles:
- move each playbook to an individual file
- rename playbooks descriptively
- define hosts and groups directly in the inventory file
- include group vars required by containers
- reduce lxc network dhcp network range to avoid conflicts with static
container addresses
- enable verbose logging for functional test output
- remove unnecessary delegations in functional test playbook
Change-Id: I5b0ab466a7374d3012ff60e2da677b0c30c966b2
The git source for python2_lxc was necessary before the package was
available on pypi, which it now is:
- https://pypi.python.org/pypi/lxc-python2
This patch removes the py_from_git role from the functional testing
playbook.
Change-Id: I40cc3fc133a196bd9b3247cdf1371768a8a9015a
This patch sets the test to check if the test is running in
OpenStack-CI, and if it is - then make the containers use
the host's pip.conf and some of the apt configuration.
All containers should make use of the hosts's apt sources
configuration. The tasks detect and implement this.
The intent is to make use of OpenStack-CI resources better
and consequently reduce the test run time.
Change-Id: I4a4ae2bdb5ffb909e087291d9198f0786e3f128a
The repo_server role does not require a memcached server and makes no use
of any related variables. Remove the memcached_server role dependency
and memcached variables.
Change-Id: I1c3b57ac3f25bac0e1640f5735cca7b73b573090
Some OpenStack-CI providers have invalid apt caches and therefore
need a forced update as an initial task in the test execution, or
the tests will fail.
This patch ensures that the apt cache is updated before any apt
installations happen.
Change-Id: I27236aa91197b20fe943823e28062afde7024f39
This patch updates the tox.ini the same bashate exceptions as are
currently in the OpenStack-Ansible playbook repo.
It also ensures that the linters and all lint targets work
appropriately and normalises the tox.ini configuration to use
uniform formatting.
The use of ansible.cfg is removed as there is no way of being
certain which paths can be used without reverting to an ugly
sed hack in the commands. This is why it is preferred to make
use of environment variables which make use of tox's default
substitutions instead. It's a more reliable way of achieving
the goal for the purpose of gating and testing.
The switch to using a git clone instead of ansible-galaxy to
download the plugins is due to the path spec not being able to
work in Ansible 2.x. [1]
[1] https://github.com/ansible/ansible/issues/13563
Change-Id: I078ad3c5751b7da09ec8553c90f261fc4d2f534f