Commit Graph

155 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 1584983367 Skip installing curl for EL
Due to the bug in Ansible [1] it does not resolve requirement of /usr/bin/curl
properly, always trying to install `curl-minimal`, which would fail on systems with
already installed `curl`.

Since `curl` presence is essential for DNF, we should be able to skip installation
of curl to EL systems, as they are all shipped with it as of today.

[1] https://github.com/ansible/ansible/issues/82461

Closes-Bug: #2046172
Change-Id: I0f1bd3aa3dbce93c42fdb9399948c41edab2369d
2023-12-29 11:05:23 +00:00
Dmitriy Rabotyagov 4f21f81dab Use relevant osbpo repository for Debian 12
Debian 11 latest repository for osbpo is Zed, while for Debian 12 both
Antelope and Bobact are available. We should use correct repos whenever
possible.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/894561
Change-Id: Iad6cc3839ad474982dcf88dddd57775cd5a628c7
2023-10-18 16:58:59 +00:00
Marc Gariepy 660c6c8092 Remove rsyslog since we should use journald instead
Change-Id: Id3a82e722e5c118a35920eabeca62a9cf87756bc
2023-09-27 15:17:39 -04:00
Jonathan Rosser 936188e26f Rename internal variable _package_list
This var is renamed _openstack_hosts_package list so that it
does not collide with a variable of the same name used in the
python_venv_build role.

Change-Id: Idedf39312df718a7d815eebb3642f75207348afb
2023-08-15 15:03:14 +01:00
Dmitriy Rabotyagov 0fdd2ad27d Drop Ubuntu 20.04 support
Ubuntu 20.04 is not supported or tested in 2023.2, so we remove
focal-related variables from the role.

Change-Id: I52f772f519db6c4924443498bb3453f69cd997de
2023-08-15 15:51:20 +02:00
Dmitriy Rabotyagov 3cf5320038 Fix linters issue and metadata
With update of ansible-lint to version >=6.0.0 a lot of new
linters were added, that enabled by default. In order to comply
with linter rules we're applying changes to the role.

With that we also update metdata to reflect current state.

Change-Id: Ide0ca8cf60f3a92c98543465d53bc4720067b153
2023-07-14 05:47:17 +00:00
Zuul f1de9887b5 Merge "Add support to install distro packages from RDO CloudSIG repos" 2023-05-23 10:38:25 +00:00
Neil Hanlon d1b4da3f66 Revert pinning rdo-deps for openvswitch 2.17 for rocky
Rocky 9.2 was released today and ships a new centos-release-nfv which
points to builds of RDO Dependencies build against RHEL 9 buildroots
instead of CentOS Stream 9. As such, we no longer need to keep Rocky at
a lower version of ovs/ovn and can match other distributions (and
Stream) on 3.1.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/883377
Change-Id: I396a75119cdfd3762a59f6e5437234fcc661b7ae
2023-05-17 14:46:35 +00:00
Alfredo Moralejo 25e8634b71 Add support to install distro packages from RDO CloudSIG repos
RDO provides two sets of repositories with OpenStack packages, RDO Trunk
and RDO CloudSIG [1]. Currently, openstack_hosts role always uses Trunk
repos but in some cases, users may prefer to use CloudSIG.

This patch adds a variable openstack_hosts_rdo_repo_type which can take
values "trunk" or "cloudsig" to select the type or repos to be used.

[1] https://www.rdoproject.org/what/repos/

Change-Id: I95ee40ae1366e815507b62ba632935e664971f42
2023-05-11 10:54:44 +02:00
Dmitriy Rabotyagov 5e92c6b3e9 Update release name to Antelope
Once distro packages are released, we can update our release name. This
should also fix distro jobs.

Change-Id: I826b08e026211271e9b0e363d4512b383dcd61d2
2023-04-19 18:09:43 +00:00
Dmitriy Rabotyagov 753c161674 Fix package exclude condition for rdo-deps
In [1] I;'ve accidentally missed round brackets which make ternary
filter test wrong value, so it always results in False

[1] https://review.opendev.org/c/openstack/openstack-ansible-openstack_hosts/+/878929

Change-Id: I6fbac1207f7c5932f7f4671fb50f3d8f5baf6cf2
2023-04-03 10:05:28 +02:00
Dmitriy Rabotyagov 449d19fd94 Limit usage of old OVS to Rocky only
As we've landed fix for CentOS to work properly with new OVS and
workarounded bug, we can now start using new OVS version for stream.

Exclude can be removed once issue will be sorted out for Rocky as well.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-os_neutron/+/878911
Change-Id: I864cb07231ebf5c820c2ce3721323bebdc337e13
2023-03-29 18:54:01 +02:00
Dmitriy Rabotyagov 181036c13b Pin openvswitch package on RHEL to 2.17
OVS 3.1 was released by CentOS NFV SIG which is built against newer
rdma-core libraries leading to uninstallable openvswitch3.1 on
Rocky Linux due to missing libmlx5.so.1(MLX5_1.24).

While CentOS doesn't need this specific rollback, it will be easier to
fix gates this way.

Change-Id: I388c115d368c0c0638d1dd4f9f11f4448a13a6b1
2023-03-29 16:47:57 +00:00
Jonathan Rosser b55f56811f Add `acl` package to all hosts and containers
Ansible will use setfacl if it is present for managing tmp file
access on a remote node, if the executable is present - see [1].

This patch ensures that the acl package is installed on all hosts
and containers.

[1] https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_privilege_escalation.html#risks-of-becoming-an-unprivileged-user

Change-Id: Ia76ebbafb0a7dfdc65364b4c374fc04cc05bfe7e
2023-03-16 20:44:09 +00:00
Dmitriy Rabotyagov cfb9d1932c Install curl by defining binary that is provided
Currently, curl conflicts with curl-minimal package on Rocky:
package curl-minimal-7.76.1-19.el9_1.1.x86_64 conflicts with curl
provided by curl-7.76.1-19.el9_1.1.x86_64

To avoid complex logic between curl/curl-minimal we just install
package by providing a path to the binary it should provide.

Based on the distro this will result in instalation of either
curl or curl-minimal.

We also disable rhel9 jobs to sort out circular dependnecy.

Change-Id: If0f08e98912f1f7d060e5b9a338062d3d8469f3a
2023-02-08 08:39:34 +00:00
Zuul e3ed6f3e8d Merge "Cleanup CentOS 8 Stream support" 2022-11-09 11:02:38 +00:00
Dmitriy Rabotyagov 5936ae3f63 Cleanup CentOS 8 Stream support
Change-Id: I35a54c17d68027b9c291321834301ca7bb2fb3e7
2022-11-02 12:57:01 +01:00
Dmitriy Rabotyagov eb042cb2c3 Switch codename to Zed
Change-Id: I2a8a91aaa535044966619706734d3ad07714d671
2022-10-24 09:56:35 +02:00
Jonathan Rosser e8ea5dd1d5 Add default apt config for ubuntu 22.04
The patch for this to the other operating systems landed before
support for ubuntu-22.04 was added to this role, so the var was
missing in the 22.04 specific vars file.

Change-Id: I3b497a65b65238ab005736376ca23d6dc0cb2f58
2022-06-02 11:02:09 +01:00
Marc Gariepy 57fa3c4ab3 Add passwd for rhel8.
Add passwd to fix rocky8 tests.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-lxc_hosts/+/842086
Change-Id: I7734fae9b434e5bf6ff5a72e5bac248d4baa2800
2022-05-17 14:59:11 +00:00
Zuul ff61081089 Merge "Do not install UCA repository for ubuntu 22.04" 2022-04-28 08:35:15 +00:00
Zuul 3b53f191fc Merge "Add nova dependency repo for distro install" 2022-04-27 19:20:33 +00:00
Jonathan Rosser 5a352aaee6 Do not install UCA repository for ubuntu 22.04
This repository does not yet exist for the latest ubuntu release.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/838762
Change-Id: I0abcce4c31d16b55fc1b8dcd70c9d137e273498a
2022-04-27 10:38:56 +00:00
Dmitriy Rabotyagov c4405603be Add default package manager config
We already have extra config for package manager. With this patch we
extend existing functionality by adding optional default value, that
will be concatinated with extra config.
Deployers are able to set default config to empty string if want to
disable that behaviour.

Change-Id: Ifa40a5296969088fd8f2d07968a8d94e3bc5b2c5
2022-04-21 14:08:38 +00:00
Satish Patel ad56e08fdc Add nova dependency repo for distro install
Change-Id: Idcb699d92a6c8086531b842ebe4889181120cdd8
2022-04-13 10:10:00 +02:00
Zuul d3da432286 Merge "Add centos-9 support" 2022-02-03 23:08:11 +00:00
Jonathan Rosser ab68220a5c Simplify generation of osbpo repo name
We only support one version of Debian so simplify the logic supporting
older versions.

Change-Id: I80c48048995d845e63b1d1eb55470a0b9381d711
2022-02-02 04:41:46 -05:00
Jonathan Rosser e84f92976c Remove ubuntu bionic vars file
Generalise the ubuntu variables into one vars file.

Change-Id: I2a9c6139b317f3209a30c21dd2b33fb3bb7c41de
2022-02-02 04:01:11 -05:00
Jonathan Rosser 0838c951a1 Remove condtionals for kernel module installation on debian
The supported versions of debian are now on kernel 5.x

Change-Id: I724c315e3e30f54c4bc71c84f61beabc7c1c5a5d
2022-02-02 03:59:47 -05:00
Jonathan Rosser b13adf0bef Remove use of advanced-virtualisation repo for centos
We see no packages installed from this repo in CI, and it will
go away with the EOL of centos-8

Change-Id: Iaeef7639871dc6a9c8d54d0bfbf74dbc9e483b37
2022-01-11 15:20:11 +00:00
Jonathan Rosser 9979b26d75 Add centos-9 support
Change-Id: Ic71d947de77377c88b34cf6d588f674ae8a27bf4
2022-01-04 13:24:11 -05:00
Dmitriy Rabotyagov 0cea2d79e1 Do not install virtualenv packages
With switching to native venv module there is no need in installing
virtualenv package separatelly.

Depends-On: https://review.opendev.org/c/openstack/ansible-role-python_venv_build/+/822901
Change-Id: I74845cc40f38c06510aae7397870b6f63540cb45
2021-12-24 13:03:42 +00:00
Dmitriy Rabotyagov 542cbef52e Fix UCA enablement for Focal
Change-Id: Ic399481f428ffc433abaf84deb1a508f57176a01
2021-12-07 19:51:03 +00:00
Dmitriy Rabotyagov 8c4ef001c1 Always upgrade ca-certificates
Ca-certificates is vital part of every system nowadays and it's
important to keep this package to it's latest state anytime role is ran.

Change-Id: Icde7acdc2ea0cbfa44d2f7f0ff8b35358d8cc9e8
2021-11-23 17:03:35 +02:00
Dmitriy Rabotyagov 92b1d408b8 Set REQUESTS_CA_BUNDLE env var
In order to force requests module inside venvs to trust system-trusted
certificate authorities, we need to define environment variable
that will provide full path to CA file. Otherwise certifi provided file
will be used, that can't be updated with new CA once they're added
to system trust store.

Change-Id: I79446813602ae094bb788d3c29654fb814ec19a8
2021-06-25 13:26:46 +00:00
Dmitriy Rabotyagov 117682cad6 Update distro mirrors to match release
We also move CentOS repos configuration to vars to align
place where release needs to be updated with other distros.

Change-Id: I621e6c58a344c0854c8a68183faf928c599c48d5
2021-06-09 22:16:41 +03:00
Dmitriy Rabotyagov 6525d563fe Add CentOS 8.4 support
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/794795
Change-Id: Iee678535d6e96dc8db30c24be24d5c6b152262c0
2021-06-07 17:18:41 +00:00
Dmitriy Rabotyagov 6c144b6787 Use appropriate osbpo repo for Bullseye
Change-Id: I8e4b236e9fc0770010dc3a62c0767ebcbc084379
2021-06-02 11:15:24 +03:00
Jonathan Rosser 41c2383592 Only install python3 virtualenv package
Change-Id: Icc8c75a24bbdbf3a9687c02156ffae777316f2eb
2021-05-13 13:59:29 +00:00
Zuul 733cc6ecfa Merge "Assume centos version is at least 8.3" 2021-03-16 17:31:53 +00:00
Jonathan Rosser 588f4ae719 Assume centos version is at least 8.3
Removing this check allows the same code to work on centos-8 stream
where the version is reported just as '8'.

Change-Id: Icc608500a099f51e5c44cecd1d259ff6315758f7
2021-03-02 07:59:48 +00:00
Jonathan Rosser dfdbc77c6d Correct the UCA repo location variable for ubuntu focal
The name of this variable was previously updated and documented
in a release note in [1]. but the old name is used for focal.

[1] https://review.opendev.org/c/openstack/openstack-ansible-openstack_hosts/+/706285

Change-Id: I4e154d22e8f9438da9cd277370c5be67a0826b4a
2021-03-02 07:53:54 +00:00
Jonathan Rosser 9c585b7257 Use ansible_facts[] instead of fact variables
See https://github.com/ansible/ansible/issues/73654

Change-Id: I949a17a8e77e96b6933e625914ea337eb94e53c2
2021-02-25 12:26:09 +00:00
Dmitriy Rabotyagov a1d970fe55 Fix debian release
Depends-On: https://review.opendev.org/770457
Change-Id: Id612a499e68f34a72ddc66d7de1954b98017d92a
2021-01-13 09:05:05 +00:00
Jonathan Rosser 0bd4c0295e Fix libsystemd version for Centos
This is used by python_systemd wheel build which breaks when the
version string is read from pkg-config

Centos-8:

pkg-config --modversion libsystemd
239 (239-41.el8_3)

Bionic:

pkg-config --modversion libsystemd
237

This causes the C preprocessor to fail when building the wheel
http://paste.openstack.org/show/800825/ as the string returned on
centos cannot be used in a preprocessor version comparison.

This can be fixed by setting the environment variable LIBSYSTEMD_VERSION
which will be used by the python_systemd setup.py script in prefernce
to the value from pkg-config

In addition this patch changed the following for centos 8.3 which are
necessary to pass tests.

1. CentOS 8.3 merged nf_conntrack_ipv4/6 into nf_conntrack
2. CentOS 8.3 PowerTools repo use lowercase for name.

Change-Id: I3fb3080c69307b38e21735d431b55eefa221f12c
2020-12-10 08:20:39 +00:00
Zuul 2abe07ea94 Merge "Set UCA repo to Victoria" 2020-10-19 15:39:52 +00:00
Dmitriy Rabotyagov d7a4ff5a6a Set UCA repo to Victoria
Since UCA provides V only for 20.04, we are not able to provide
distro installs for 18.04
Still we're leaving UCA fixed to U for bionic to get required KVM
libraries and other dependencies.

Change-Id: I94fbc9fc75e188d3a4a334ffb08836d431003764
2020-10-16 17:06:19 +03:00
Dmitriy Rabotyagov 5b5159c0b2 Remove unsupported OS
Do some role cleanup to path for not supported OS,
like gentoo or suse.

Change-Id: Icebce8e00485aa892ff3bbcbbf9652abc77a1c99
2020-10-16 16:57:08 +03:00
Jonathan Rosser 629d2d0dd4 Use xt_MASQUERADE instead of ipt_MASQUERADE for kernels > 5.2
The only supported operating system this affects is Ubuntu Focal.
Change-Id: Id72d2b2dab566393b4fde9ed2707f68bd1bc2fa5
2020-09-28 10:57:31 +01:00
Dmitriy Rabotyagov 1b0a0c79bc Replace yum config manager with dnf alternative
We need config-manager to enable repositories for CentOS 8 hosts.

Also, since we do need PowerTools inside lxc containers, we should
install tooling not only for bare metal, but also for containers.
Some projects, like manila, also require some packages out of
PowerTools repository.

Change-Id: Ic150c2698acc3b78a60de36b4714fe2aafa3e970
2020-07-09 20:32:18 +00:00