Commit Graph

157 Commits

Author SHA1 Message Date
Zuul 19a276e619 Merge "Use OriginalName instead of Name in systemd.link" 2024-02-13 14:54:02 +00:00
Dmitriy Rabotyagov b9c7d79089 Use OriginalName instead of Name in systemd.link
Name option is not a valid one for systemd.link [1] while it is for systemd.network [2]
though having same meaning.

This basically resulted in link files being just ignored by udevadm
and were not loaded properly after reboot

[1] https://www.freedesktop.org/software/systemd/man/latest/systemd.link.html#OriginalName=
[2] https://www.freedesktop.org/software/systemd/man/latest/systemd.network.html#Name=

Closes-Bug: #1896589
Change-Id: If82946b7f5ad3c618606110576c586632f9bbd08
2024-02-02 11:19:00 +00:00
Gene Oden 71ecf3b13e Add support for the ArchLinux distribution
Change-Id: I352e049be2c98fddef01184282842946d937b27b
2024-01-03 00:22:52 +00:00
Dmitriy Rabotyagov 70442c5efb Fix defenition of multiple static routes for network
Current logic was relying on iteration inside the template. However,
since config_template module was used to deliver network configuration
it was merging sections having same name together.

While this behaviour is correct one for config_template as all sections
must be unique from ConfigParser perspective and in order to apply
overrides properly, it was not suiting the way how routes should be
defined in networkd configuration.

To workaround the issue we place routes separately under <network>.d
directory, which should be supported by systemd [1]

[1] https://www.freedesktop.org/software/systemd/man/latest/systemd.network.html

Closes-Bug: #2045819
Change-Id: I01aa44dcdc85e32d18dd52bcd4878a9017fb6ead
2023-12-09 05:24:57 +00:00
Dmitriy Rabotyagov 18b36137dc Ensure filename is always defined for network/netdev
Right now we define resulting filename in the loop itself, which limits
ability to predict expected filename for another loop where list might
get filtered.

So to get more expected behaviour between tasks we always add filename
to the elements in vars.

Change-Id: I579980ea3a5e9349d25885530c979649cb6dcb81
2023-12-08 17:51:16 +00:00
Dmitriy Rabotyagov 1e6fc97dbe Fix linters 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: I3aa1a19eb1aa735bafb29e5babe433b77a8d1f47
2023-07-12 12:33:19 +02:00
Andrew Bonney 4a7012e366 Handle omitted variables which appear as empty strings
Changes to external roles cause some variables to be passed in
as empty strings which result in invalid config and InvalidArgument
errors.

This could be addressed here or in the calling role.

Change-Id: Iee71e9839d4c8d318c2c36152d966dd5a1b88111
2023-01-11 08:08:37 +00:00
Andrew Bonney 5acf51aec3 Fix static routes to use Destination rather than Source key
The current template results in a default route being added to the
routing table rather than a route specific to the destination
requested.

Change-Id: I0ef53631989ea2dc12d2540edeed95d0a466353b
2023-01-10 14:56:47 +00:00
Zuul 4d8060b61d Merge "Allow to provide multiple VLANs" 2023-01-10 10:28:50 +00:00
Dmitriy Rabotyagov c70084757d Update tox.ini to work with 4.0
With tox release of 4.0, some parameters were deprecated and are ignored now
which causes tox failures. One of the most spread issues we have is using
`whitelist_externals` isntead of `allowlist_externals`


Change-Id: I62d6dc8e5b075b4803b0384d5533980c01873f66
2022-12-27 17:53:06 +01:00
Dmitriy Rabotyagov 9b9f791377 Allow to provide multiple VLANs
In order to create multiple vlans from the same interface, VLAN
key must be repeated multiple times. At the moment our role limits
that since vlan can not be a list. We adding an option for vlan being a list
at the same time keeping backwards compatability.

Change-Id: I94bf2157e1e95c3fd5af318eac8238cd6c3b6fdc
2022-12-23 17:27:46 +01:00
OpenStack Release Bot 0fbdc22ada Update master for stable/zed
Add file to the reno documentation build to show release notes for
stable/zed.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/zed.

Sem-Ver: feature
Change-Id: Id41efe5e712e9df3b670efd5b3ab8cdfd20fc609
2022-12-13 13:05:36 +00:00
Dmitriy Rabotyagov 0ae090b0d5 Add repos only when there're packages for install
At the moment we allow not to install packages by providing
systemd_networkd_distro_packages as an empty list. When that happens
it makes sense also to skip all tasks related to adding repositories
when no packages are going to be installed.

Not installing packages might be useful for containers creation or
in situations when there is no networking yet, but we know that
systemd-networkd is already present.

Change-Id: I5e12cb0eb07b5eb8dcca462dbe8239a926ef80e6
2022-10-14 18:21:37 +02:00
Erik Berg 356db62780 Remove redundant vars line
This line snuck in with I4d4a51ca805857d56f108c3717beaa5648f86ccb
probably to bring it in line with other OSA roles, but should already
be covered by the distribution_major_version line above.

Change-Id: Ifcf3506cc8b4da41c5cca29b53955c5153a18cc3
2022-09-15 12:26:56 +02:00
Dmitriy Rabotyagov 1906bd37ec Switch sphinx language to en
With sphinx release of 5.0.0, they changed default for language variable
to 'en' from None. With that current None valuable is not valid and should
not be used.


Change-Id: Icc83041041372b0fb5a9fa897d336f48f3df78b9
2022-05-30 16:01:11 +02:00
Dmitriy Rabotyagov 09c629cf52 Update documentation on role requirements
In README file we're refferencing plugins repo for installing
config_template from it. However, we're using module from it's
collection.
We're updating documentation along with renaming a-r-r to more common
requirements.yml and adjusting rc file
to drop not required overrides from there.

Change-Id: I2329c2744348a8d704fe36f81e4ad43602c39541
Closes-Bug: #1961621
2022-05-13 10:42:11 +02:00
OpenStack Proposal Bot b0a57049fd Updated from OpenStack Ansible Tests
Change-Id: Ibb4dec45178805052d04aede4d4a6cc3427060c3
2022-04-04 09:22:59 +00:00
Jonathan Rosser 158be1e322 Cleanup setup.py config
Change-Id: Ibab769cc92f72ac8106756da3974d15063feaf75
2022-04-04 10:22:21 +01:00
Marc Gariepy d62daa24f9 Change location of ipaddr filter
ipaddr filter has been moved from netcommon to utils collection [1]

Based on that we must add that collection to requirements.

[1] db4920ebf6

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/831525
Change-Id: Iac92e247d209d848c82f625c190c200cdc05a67a
2022-03-02 14:59:43 -05:00
Zuul 3d60b5eee2 Merge "Add integrated linters test" 2022-01-25 17:13:24 +00:00
Dmitriy Rabotyagov 46f4aac1f6 Add integrated linters test
Change-Id: I8c2de129f496032a3c73a0354bec8694dfc53000
2022-01-25 11:29:12 +00:00
Zuul 08fba6ac72 Merge "Add centos-9 support" 2022-01-13 15:03:43 +00:00
Zuul 130c9f81ba Merge "Refactor use of include_vars" 2022-01-12 15:26:57 +00:00
Jonathan Rosser c802d037b9 Refactor use of include_vars
Use a first_found lookup instead of a with_first_found loop so that
the 'paths' parameter can be used.

This ensures that only vars from the role are included, and not vars
from a parent calling role. This can happen when a parent role has
a higher priority vars file available for inclusion than the role
it calls.

Change-Id: I4d4a51ca805857d56f108c3717beaa5648f86ccb
2022-01-12 07:59:06 +00:00
Dmitriy Rabotyagov 9847b5f0bf Drop plugins from role requirements
Change-Id: I95c56c0ae013da8b20e05435f58712ad29451666
2022-01-11 16:58:21 +02:00
Jonathan Rosser d8af1100af Add centos-9 support
Change-Id: Ia6f9cc3222ecd467c3a52e25e1cb74f267aea836
2022-01-11 14:14:55 +00:00
OpenStack Proposal Bot 61b12a3996 Updated from OpenStack Ansible Tests
Change-Id: I1a217b3e33f5dad88d99c6287f87d0a021f598ce
2021-12-17 16:50:36 +00:00
Dmitriy Rabotyagov 4ca473b944 Use config_template as a collection
Since we still use ceph-ansible that has their own implementation of
config_template module it's worth to use mentioned module as a collection
explicitly.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/819814



Change-Id: I7024d962ed858b0442583e24612a5da4d3fa37e7
2021-11-30 15:17:07 +02:00
OpenStack Proposal Bot e5de914807 Updated from OpenStack Ansible Tests
Change-Id: I0d7a1e935fbcb1c963189c845509bda3d006c175
2021-03-22 08:55:15 +00:00
Jonathan Rosser ce9cba08a8 Remove references to unsupported operating systems
All references to Gentoo, SUSE, Debian stretch and Centos-7  are removed.
Conditional tasks, ternary operators and variables are simplified where possible
OS specific variables files are generalised where possible

Change-Id: I214f35cfff5fa9dd703733f795d6a7e414d729ca
2021-03-16 08:58:38 +00:00
OpenStack Proposal Bot 96355f85dd Updated from OpenStack Ansible Tests
Change-Id: I7718a3bafc31a95b9f3a42ab29c5cd2ab2e09d39
2021-03-12 22:23:47 +00:00
Zuul b812fff93a Merge "Use ansible_facts[] instead of fact variables" 2021-02-25 13:30:32 +00:00
Jonathan Rosser 63ad4cffac Use ansible_facts[] instead of fact variables
See https://github.com/ansible/ansible/issues/73654

Change-Id: I36a098e4b028bdf09b38e2f2c99f68f311ce9d32
2021-02-24 14:26:31 +00:00
Jonathan Rosser 3213d427e6 Add reference to gpg key location to EPEL repo config
This is necessary on centos-8 stream

Change-Id: I74f02669b013b8580d3469a8ffe214d88cd0f525
2021-02-17 16:17:36 +00:00
dmitriy 5b327a5ca5 [reno] Stop publishing release notes
Since we copy all release notes to the integrated repo there is not need
in publishing release notes for each repository. We should only verify their
validity and linting.


Change-Id: Ic79a437ec219d99a60a0e3af2633d93bc4314779
2021-01-22 18:23:02 +02:00
James Denton 48a217bf2d Add GPG Key for EPEL8 Repo
The patch adds the GPG key for the EPEL 8 repo to allow gpgcheck
to be successful.

Change-Id: I6402d45ca541b8bb7a35ed73b63256f13c58e4f3
2020-11-02 10:22:15 +00:00
OpenStack Proposal Bot 15d82f240e Updated from OpenStack Ansible Tests
Change-Id: I685bd089d99b347e341a26acb9fbefff905ef28f
2020-10-30 13:10:27 +00:00
Jonathan Rosser 6b1c9e95b6 Fix linter errors and update tests
This patch fixes linter errors, updates tests, and adds the MTUBytes
interface configuration option to the systemd .network file to support
live MTU changes upon restart of systemd-networkd. Without it, MTU
changes will only be effective upon boot (might only affect Focal).

Change-Id: I05da4036b0ddc3fb88ba958f413a32fa6819de61
2020-10-28 12:34:10 -05:00
Dmitriy Rabotyagov 438e946a06 Add CentOS 8 support
Change-Id: I8eb7b1ce7cadc910386cfb8bf1d9b41194b2ecdd
2020-06-23 12:44:21 +03:00
Marc Gariepy 15a0be8cbb remove ansible_python_interpreter
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: I5c5eba38917254187a5b006fd810977ee48ec023
2020-06-11 15:58:56 -04:00
Zuul 89c354a48b Merge "Use newer openstackdocstheme and reno versions" 2020-06-05 10:54:01 +00:00
OpenStack Proposal Bot 3257657a0d Updated from OpenStack Ansible Tests
Change-Id: I9bf0e09a7d4873ad5aeec1b6f1b16d85cea47d4a
2020-06-03 19:13:27 +00:00
Andreas Jaeger b7400315fa Use newer openstackdocstheme and reno versions
The sync from https://review.opendev.org/733244 updated to
openstackdocstheme 2.2.1 and reno 3.1.0 versions.

Set openstackdocs_pdf_link to link to PDF file. Note that
the link to the published document only works on docs.openstack.org
where the PDF file is placed in the top-level html directory. The
site-preview places the PDF in a pdf directory.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: I11211f345869d24e82552844a6f8d57db1103aa1
2020-06-03 18:57:45 +02:00
OpenStack Release Bot 241bbcd219 Update master for stable/ussuri
Add file to the reno documentation build to show release notes for
stable/ussuri.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/ussuri.

Change-Id: I20ff07ff845a51fe310c6607ba6a6217ce33bf99
Sem-Ver: feature
2020-06-01 13:07:40 +00:00
Zuul e99175611f Merge "Updated from OpenStack Ansible Tests" 2020-05-22 15:24:11 +00:00
OpenStack Proposal Bot eace2ef4a9 Updated from OpenStack Ansible Tests
Change-Id: Ic41d8e5fa4eaf95da7e5420b06671916816cc14d
2020-05-22 07:12:38 +00:00
Andreas Jaeger e99e15b793 Update docstheme for style
New version of openstackdocstheme (Victoria+) respects pygments_style.
Since this repo is using now Victoria (master) requirements but has
not branched for Ussuri yet, it uses the new version.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

Change-Id: Id7d1efab938389929e6375bf8570f6c210234876
2020-05-20 17:24:39 +00:00
Zuul cc4eeb1baf Merge "Do not rebuild initramfs for containers" 2020-05-19 16:30:12 +00:00
Zuul b743526211 Merge "Fix systemd-resolved config conditional" 2020-05-19 13:38:20 +00:00
Jonathan Rosser 51daac22c6 Do not rebuild initramfs for containers
Containers do not have an initramfs so this is not useful, and fails
for Centos-7 with:

Can't write to /boot: Directory /boot does not exist or is not accessible.

Change-Id: Ibc6ff871ad6984d4e0f29693f4827f57169aef92
2020-05-18 22:01:20 +00:00