RDO repo relies on some libraties that are present in PowerTools
repository. This repo exists in base image, however is disabled.
From the other side, zuul adds this repo with base jobs and enable it
in CI by default.
So not to deal with getting right URL and etc, we're just running command
Change-Id: I028dce38a4b7dbdd3683b4ad07bd2f5cd19ed1b5
This patch aims to simplify generation of hosts
file content as it's now generated purely with ansible.
As a result upgrade jobs should be fixed afterwards
Change-Id: I7961115f215153515ba3f3a00bbbeeb9fb4568f1
This patch removes a task which adds an entry to /etc/hosts for
the hostname / 127.0.1.1.
Some services, such as rabbitmq, require that the ip address they
are configured to listen on resolves to a hostname with the same
ip. Before this patch there were two /etc/hosts entries for the
hostname of each host, 127.0.1.1 and the mgmt network address.
This patch ensures that the /etc/hosts file is unambiguous and
always resolves the hostname to the mgmt network ip address.
Change-Id: I5c9bf4cd0a3a416447f6f1797df4657402a64382
This functionality can be used to install any CA certificates that
the deployer requires into any combination of hosts/containers.
Change-Id: Ic1292e18c8add78e8cb30f624be96292b153d4fe
This change allows the deployer to specify lists of distro packages
which will be installed in addition to those specified by this role.
Rather than simply concatenate the lists of installed packages, extra
tasks are added to make the install ordering be as follows:
* install initial packages for repo/gpg keys
* configure repos
* install user defined extra packages
It is possible to install packages from the newly configured repos, as
the user defined package list is installed last.
Change-Id: I86e541e0c7d38460c697807c4f6ae5b6e7310a15
inventory_hostname is ansible alias of the host. It may be
equal to hostname in most cases, but also can be short alias for
convenience.
ansible_hostname is discovered hostname, i.e. real hostname.
It make more sense to use real hostname to construct fqdn
and use inventory_hostname as an alias.
Change-Id: If980f67da27035aa81b554ef59dedaf5a34357f4
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: I5eb9cd47b128cbc7617279777c5da8b357795eae
This patch makes the openstack_hosts role idempotent.
Depends-On: Ie414d32d39fdeeedd77fe94b57a09ba344084ec1
Change-Id: Ie6537eeb923ae868b0ebc23057b34f0750781161
Signed-off-by: Major Hayden <major@mhtx.net>
The variable name had a typo and appeared as
`openstask_host_module_file` when it should have been
`openstack_host_module_file`.
Change-Id: I0c94ad7e4a0779edd522a34ed3520db27c5a9550
Signed-off-by: Major Hayden <major@mhtx.net>
This patch ensures that openstack_hosts gate jobs use the nodepool
variables set within openstack-ansible-tests.
Closes-Bug: 1748253
Change-Id: I343eea459aa8992e80291486decb03db4e224202
This fixes the following problem:
ERROR! the role 'pip_install' was not found in
/vagrant/tests/common/roles:/home/vagrant/.ansible/roles:/home/vagrant/.ansible/testing-role:/vagrant/tests/common
The error appears to have been in '/vagrant/tasks/main.yml': line 74,
column 11, but may be elsewhere in the file depending on the exact
syntax problem.
The offending line appears to be:
include_role:
name: pip_install
^ here
to retry, use: --limit @/vagrant/tests/test.retry
Change-Id: I960e9c4e0e060dbbd65ecd2fee5e56d394fe6e88
We currently have spread out package/host management to multiple
roles, sometimes repeating ourselves in the process (see
pip_install and openstack_hosts overlap)
That is against Ansible principles, and we should have one role
that configures the minimum (to run openstack), applying it to
all the nodes, maybe behaving slightly differently depending on
some parameters. Here that parameter is if the host is a container
or not. If the host is a container, all the physical host
configuration (kernel and sysctl) is be skipped, the
rest of the configuration (packages/repos) still applies.
This needed a refactor to split the tasks into those two group
while remaining efficient and avoid multiple back and forth
of package installs/removal. For that last point, new defaults
variables were introduced, allowing overrides per host/group.
A node now member of a group x can now directly use this role
to setup all its necessary repos and keys.
Last, but not least, this override mechanism can now easily
trigger pip_install role, which can from now on, be removed
from every role. On top of that pip_install role can now
remove its repo management, and focus on installing pip on
hosts that don't have a proper version of pip installed.
Change-Id: Ibf145e561c80a12055bd4d5dca3914c4d495a748
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: If38825e721ca099fd13b51e87fcb8dbb9714c99e
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: Ie83136aacc9291dc9e76014c061b05f070142cbf
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
Add 'become' and root 'user' options to the playbook instead of using
'ansible_become' through an inventory variable.
Change-Id: Ifc29eba5fe3de8b29a322a35501919074e948be9
Update the 'openstack_host_specific_kernel_modules' tasks so that they
no longer need to skip ansible lint checking. The kernel configuration
file is now slurped and searched through to find out if the provided
list of modules are valid and loadable.
For testing, a 'openstack_host_specific_kernel_modules' test var and
assertion has been added.
Change-Id: I5d26b055fe8582b29ff40e0daa896bf1b7207161
When upgrading from a /etc/hosts file created before commit
ae02667b84 the old entries were not
removed on the first run. The hostname generation had to be run again to
remove them.
Reordering the if statement ensures that existing entries are changed
instead of adding new entries for the same IP address and that
duplicate entries are removed in all cases.
Change-Id: I2a21d13310b457e91a090541ae7f02f974413965
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: I3a509b4ca28900715be51df40b0b9a2d40e2bcf7
template systat cron for centos
only install /etc/default/systat on ubuntu
/etc/default/sysstat only configure debian-sa1 which is not on centos
introduce 2 vars :
openstack_host_sysstat_file
openstack_host_cron_template
Change-Id: Ib4fde6e4b9d3ce23524a5b5a17dbf15065bbeb4c
This change moves the role run and pre-steps to the tests
repo.
Depends-On: Ib2ec8840966aea574fef7387cee2ffabd597b4cb
Change-Id: Ib27bc814b14e3584450423d6a7f0e6842fd3fd98
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
The change simply adds a more complete hostname within the
"/etc/hosts" file for all nodes within inventory which
ensures all hosts are reachable and have a proper host entry
for itself and all other hosts. Additionally the hostname
insert script has been made idempotent and tests have been
added to ensure functionality.
Partial-Bug: #1577245
Change-Id: Ib1e3b6f02758906e3ec7ab35737c1a58fcbca216
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
* The default apt packages have been moved into a var file
that is only loaded when the detected OS is matched.
* The Install task file has had the apt specific tasks moved
into a named install task file.
* Ubuntu 16.04 and CentOS 7 support have been added
Implements: blueprint multi-platform-host
Change-Id: I469081671415df23a35108abf4452722ba011f9b
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
The existing lineinfile implementation is buggy when changing and removing
entries from the global_environment_variables dict
Change-Id: Ic9899b1a4a72e72d0bac26eb8f650681186332e1
Partial-Bug: #1573131
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: I995bd1d365c978e475047d26744f19adf94be3ee
This change updates a few things that were missed when the role
was cut over.
Change-Id: I91b9354e70e072d8c878905605afdbf4b7736841
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
There are 2 ways to realize the privilege escalation
needed for the gate jobs.
1) Editing the playbooks (and hope to not forget to
write the sudo/become lines for every role)
2) Editing the inventory and set the variable there.
I'm taking the second approach with the minimum set
of variables (become_method is sudo by default and
become_user is root by default).
Change-Id: I54b8c1489bfc46d4a03c907f4a86f0313c7778ff
The change moves the role out from the main repo openstack-ansible
repository and into its own standalone repository.
Items within this change:
* The role has been updated to ensure it runs standalone.
* Tests added to the role within tox.
* Functional tests added to the role that can either be run
via the run_tests.sh script or using tox.
* dev requirements have been updated for testing usecases.
* Docs added to both the README.rst file as well as the docs
folder.
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>