672 Commits

Author SHA1 Message Date
Zuul
c387c1a0ea Merge "Auto-fix usage of modules via FQCN" 2025-02-27 21:48:26 +00:00
Zuul
ac3ee2473c Merge "Auto-fix yaml rules" 2025-02-22 13:35:33 +00:00
Dmitriy Rabotyagov
c76b93207b Apply a tag to the pki role include
At the moment there's no handy way to perform CA installation or
update, as pki role is not tagged properly.

Applying tag to the role will allow to narrow down scope of the role
only to PKI installation if that is needed.

Related-Bug: #2098918
Change-Id: I904d0e03574ea91a4766aeb9ae21152113f47c6f
2025-02-20 09:54:31 +01:00
Dmitriy Rabotyagov
6f02bcf4af Auto-fix usage of modules via FQCN
Since ansible-core 2.10 it is recommended to use modules via FQCN
In order to align with recommendation, we perform migration
by applying suggestions made by `ansible-lint --fix=fqcn`

Change-Id: Ibf7bac98d8ca25801a2abd0f4b195d6a248e6589
2025-02-12 08:36:03 +01:00
Dmitriy Rabotyagov
5f1a3b2da1 Auto-fix yaml rules
In order to reduce divergance with ansible-lint rules, we apply
auto-fixing of violations.

In current patch we replace all kind of truthy variables with
`true` or `false` values to align with recommendations along with
alignment of used quotes.

Change-Id: I96f2934f392affc01cdf3b85ad9198e21a6991be
2025-02-12 08:34:02 +01:00
Daniel 'f0o' Preussker
ffe002a319 Make sysctl configuration path configurable
Defaults to /etc/sysctl.conf to retain current behavior

Change-Id: Ifab2b86b38fdf2706eecb6a846ecd6e1c5a8714b
2025-01-19 09:07:18 +00:00
Dmitriy Rabotyagov
bab1f5c75c Store UCA GPG file in-repo
Referring gpg key for UCA on the host results in absent GPG inside
containers once repos are copied from hosts to LXC on early step.

While we could copy /usr/share/keyrings, it's better to align and
distribute content of GPG rather then copying things around.

Change-Id: I43b6b73d6e9a1b3db484616f5295f64e4326bdc0
2024-10-16 09:51:04 +00:00
Dmitriy Rabotyagov
09ae63d721 Map all relevant architectures for deb822 repository setup
At the moment we fixup only x86_64 arch while there way more arches
in the wild. So it's worth to have a mapping for architectures in place
rather then maintain quite complex replaces.

Closes-Bug: #2081764
Change-Id: I2b9e65a533789f92d6dd7b8059e21268e4a39ab7
2024-10-04 22:02:44 +00:00
Jonathan Rosser
e3e79ff601 Enable UCA repo for ubuntu noble
We do this by switching to a common vars file for all ubuntu releases.

Depends-On: https://review.opendev.org/c/opendev/system-config/+/930294
Change-Id: I1402289c5c4fab1e8be0b52d57588bc930f62395
2024-10-01 16:24:20 +00:00
Dmitriy Rabotyagov
62172a68e7 Switch codename to Dalmatian for 2024.2
Change-Id: Icb1732cd013cfff8ab29a00068f86c7926e59f87
2024-09-30 09:53:27 +02:00
Zuul
d4089b0a70 Merge "Rename libselinux python package bindings" 2024-09-25 15:10:34 +00:00
Zuul
d5cf38b042 Merge "Ensure python libselinux bindings for containers" 2024-09-25 09:21:22 +00:00
Jonathan Rosser
2f50050f2f Vendor osbpo gpg key into the role
This allows the gpg key to be installed without requiring external
connectivity which will be beneficial for offline installations.

Related-Bug: 2081775
Change-Id: If7581e8ce1cba9f02406e8ff2748a4470e46237a
2024-09-24 09:51:10 +01:00
Jonathan Rosser
a131f1fe3f Ensure apt sources.list.d directory exists.
Systems built from minimal images may not have this directory
present, so ensure that it exists.

Change-Id: I7e5932f20acbbf516ada9ebec4eb0db7781fbfb8
2024-09-24 09:10:21 +01:00
Dmitriy Rabotyagov
7a2b8421fb Rename libselinux python package bindings
Currently libselinux-python3 is a metadata package providing
python3-libselinux. So let's use current package name for installation
while it's available.

Change-Id: Ieaee988819bc88359c9356d4edbf93ed323ac5e2
2024-09-16 17:22:50 +02:00
Dmitriy Rabotyagov
143aa8bad3 Ensure python libselinux bindings for containers
Due to a CentOS Stream behaviour, which occasionally tries to enforce
selinux inside LXC containers and requires for libselinux python binding
to be present install containers for modules to execute.

This mainly occurs for utility container, but we add for all containers
just to be on a safe side.

Closes-Bug: #2080765
Change-Id: I0d6bb175edae9a45d5cbc3bf8ad21ada98d2abc0
2024-09-16 17:18:20 +02:00
Jonathan Rosser
1aef1f258c Manage apt repositores and keys using deb822_repository module
The apt-key module is deprecated so the code is refactored to allow
any of the deb822_repository features to used instead.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-os_tempest/+/907886
Change-Id: I4adb5c17b7dc6cd6c6b85ff36b9176f14d841e23
2024-09-09 12:58:52 +00:00
Dmitriy Rabotyagov
525f1ab88a Ensure python3-packaging is installed for distros
With modern setuptools presence of packaging module for python might
be essential for some tools to operate properly. In most cases the
package is being pre-shipped in the image, though it's still worth to
ensure it's presence rather then rely on the specific image build.
This should also ensure that we have the module inside LXC as well.

Change-Id: Idb31e2644511e07d7bbb8064f8c749870b14397e
2024-07-29 10:35:07 +02:00
Jonathan Rosser
734de08637 Add vars for Ubuntu Noble
There is no UCA repo for Noble.

Change-Id: I6bff489adb8178299687991f42379dfa2f712349
2024-07-17 17:34:41 +01:00
Dmitriy Rabotyagov
92dd758f04 Ensure git safe directory is templated properly
We're missing `=` in gitconfig template. That template is being used
only when `git` is missing from the image template, which is the reason
why it slipped attention.

Change-Id: I602cb8b603306241e601cffc2324cb618a1dc792
2024-07-08 16:54:53 +02:00
Zuul
307bf9a207 Merge "reno: Update master for unmaintained/zed" 2024-06-06 10:45:55 +00:00
Jonathan Rosser
09663ab12a Do not mark all directories as safe for git clone by default
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/920758
Change-Id: I1c2e1d10efe0e9f7a8f4c5f0d914825767a2f655
2024-05-29 16:50:26 +00:00
Jonathan Rosser
a8d1c8268a Allow openstack_hosts role to configure git safe.directory entries
This is defaulted to '*" and will be undefined when a CI specific
override is subsequently merged to the openstack-ansible repository.

Change-Id: I1c1dc35d8d59db4ae2b6770a620d91548a8a3734
2024-05-29 16:50:20 +00:00
784b9e5e0b reno: Update master for unmaintained/zed
Update the zed release notes configuration to build from
unmaintained/zed.

Change-Id: I1327dba4c8e2a56b0382b927267bdcb0602eec9e
2024-05-10 18:53:23 +00:00
Dmitriy Rabotyagov
a3cf1675c3 Pin python3-pluggy back
The package is included in Caracal UCA repo but requires newer
python3-pytest which is not present in UCA and causes a conflict [1]
Corresponsive bug report was created towards UCA [2], but until then
it's worth to pin package back to be installed from universe rather then
UCA.

[1] https://paste.openstack.org/show/b9gCyKaVHjYMeupI5dLD/
[2] https://bugs.launchpad.net/cloud-archive/+bug/2064798

Change-Id: I47e796648a820927b79794110d07a9ce88d98cc2
2024-05-04 13:04:01 +02:00
Zuul
b7d7bafea2 Merge "Update OpenStack Release to Caracal" 2024-05-03 20:59:36 +00:00
Dmitriy Rabotyagov
c67f572857 Ensure codename is lowercased for cloudsig install
With [1] option to install cloudsig repo from package was added, though
release codename was not lowered, which results in a failure when
attempting to use cloudsig instead of trunk.

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

Change-Id: I28311bb6f5fb43a007f58bb97683c1ab04cc786e
2024-04-26 18:04:32 +02:00
Dmitriy Rabotyagov
e738b7fa56 Update OpenStack Release to Caracal
As RDO and UCA released Caracal packages, it's time to switch release
codename and install appropriate distro packages.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/914188
Change-Id: I85bc69576cd6fcd7bd970b7501eb649c1f1caec5
2024-04-24 16:43:08 +02:00
Zuul
f5b386f3d4 Merge "Drop task that deletes old UCA repo" 2024-03-05 13:56:30 +00:00
Dmitriy Rabotyagov
88a9be604b Resolve custom hosts records on hosts
In order to save quite some time during the role execution, we apply
run_once when defining /etc/hosts content.

While this good for "static" content which is based on the inventory,
resolving openstack_host_custom_hosts_records once may lead to
unexpected behaviour. For instance, if host record depends on some specific
group or other variables defined in host/group variables.

In order to resolve it accordingly, we merge status and custom records together
in blockinfile, which allows to resolve record individually for each host
and not having penalty for most usecases.

Change-Id: I48274de908fc6dc4a2e22a789e8355c7ba263599
2024-02-15 12:26:17 +01:00
Jonathan Rosser
08784f1e67 Drop task that deletes old UCA repo
The variable `uca_apt_source_list_filename` is not defined anywhere
in openstack-ansible so this task is redundant.

Change-Id: I15cc331ad5ec11507860bf61b0c2b20fa8c0b2a0
2024-02-01 15:12:01 +00:00
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
2e78c2314d Remove localhost record from hosts file
After adding `localhost` to inventory explicitly [1] this caused an interesting
side-effect, where a record for `localhost` is being added to the managed block
in /etc/hosts file, which might override FQDN defenition for the host.

This also makes healthcheck-hosts.yml fail the test, since expected record is not present.

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

Change-Id: If1840530a54aa9ae22eda1d3094f0c40ab66ddde
2023-12-29 10:48:24 +01:00
Dmitriy Rabotyagov
a93a952652 Switch codename to Bobcat
Once UCA and RDO have released their packages for 2023.2 we can update
the openstack_distrib_code_name

Change-Id: I4da504eb51ee7f5359902d1af432657982b8fc84
2023-10-25 20:10:32 +02: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
Dmitriy Rabotyagov
565245f2f5 Define mode for journald configuration file
Change-Id: I3eb4162787a415d1d1556cab55d0ab157f1ca4c4
2023-09-18 15:32:21 +02:00
Dmitriy Rabotyagov
65f28c5bb4 Add ability to define a config for journald
At the moment we aim to make systemd-journald a universal destination
for log files across services. With that there is currently no way
of configuring journald using OSA. While this might be
neat for production deployments, it's very valuable to have for CI
as well.

Change-Id: I70a8c9266cb12811a58f5a183955dbec319e539f
2023-08-22 08:25:21 +00:00
Dmitriy Rabotyagov
4afafbbdb4 Drop bits for unsupported OS
There were couple of tasks designed for unsupported
operating systems like Debian 10 or CentOS 8 that were
left during previous cleanups.

Change-Id: I5f920c16a6f6053e64b8013b2a668eb3b1ed2f6a
2023-08-21 16:59:56 +02: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
Zuul
ca1357f61e Merge "Add openstack_hosts_file tag" 2023-03-27 15:36:04 +00:00