Commit graph

963 commits

Author SHA1 Message Date
Sergei Petrosian
fd99c0b783 ci: Skip reviews for PRs with [citest_skip] in the title
- Add info about .coderabbit.yam for AI assistants to contributing.md
- Note that CodeRabbit uses config from the main branch so this change will apply
after this PR is merged.

Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
2026-05-21 12:03:55 +02:00
Rich Megginson
59f4ef91ee refactor: use ansible.posix 2.1.X for EL7 compatibility [citest_skip]
The recently released ansible.posix 2.2.0 does not work on EL7.
Pin the version of ansible.posix to 2.1.X.

NOTE: Even though this role might not support EL7, this update
is applied to all system roles for consistency.  Plus, when this
role is part of the system roles collection, all roles must use
the same version of ansible.posix - there is no way for a role
which is part of a collection to use a different version of a
dependency than the version used by the other roles.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-05-20 08:04:04 -06:00
Sergei Petrosian
cd58ebb508 ci: Add config file for CodeRabbit with custom rules
Sourcery that we currently use cannot read documentation files and best
practices, it's rather a refactoring tool.
So I want to introduce CodeRabbit that allows creating .coderabbit.yaml with
custom rules and conventions.

Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
2026-05-19 14:06:47 +02:00
Rich Megginson
42cf0cf23a docs(changelog): version 1.20.0 [citest_skip]
Update changelog and .README.html for version 1.20.0

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-05-12 07:28:38 -06:00
Sergei Petrosian
313f3ea4ec feat: Use verbosity-based logging in network role
- Replace no_log: true with no_log: "{{ ansible_verbosity < 3 }}"
  in all tasks (setup, service_facts, package_facts, and service tasks)
- This allows output to be shown when running with -vvv or higher verbosity
- The no_log was used for verbosity control, not security purposes

In the network role, no_log: true was used to reduce verbose output,
not to protect sensitive information. Using ansible_verbosity allows
users to see the output when debugging with increased verbosity flags.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
2026-05-12 07:18:48 -06:00
Rich Megginson
1552fe866a docs(changelog): version 1.19.0 [citest_skip]
Update changelog and .README.html for version 1.19.0

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-05-07 14:53:54 -06:00
Rich Megginson
b23e006322 refactor: log-to-syslog in debug_flags will log internal trace msgs to syslog [citest_skip]
If you set __network_debug_flags=log-to-syslog then the internal trace messages which
are returned by the module will also be logged to syslog.  This is useful for when
the network role hangs and times out and is killed before those messages can
be returned.  The trace messages printed to syslog can help debug problems.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-05-07 14:21:02 -06:00
dependabot[bot]
1f5c1a45fb ci: bump actions/github-script from 8 to 9
Bumps [actions/github-script](https://github.com/actions/github-script) from 8 to 9.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v8...v9)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-version: '9'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-01 12:02:44 -06:00
Rich Megginson
3267ddb287 test: ensure integration and unit pytest work in collection mode
Refactor the common code in tests_unit.yml and the integration pytest
into a single block of code.

The tests/ directory has a library sub-directory with a symlink to the
network_connections.py module.  This was causing problems because the logic
in get_modules_and_utils_paths.yml really wants the real files and
directories, not the symlinks, and for some reason the bash `-f` test
is returning `true` for the symlink.  Instead, ensure that we do not use
the link by using `-L` to screen it out.

Also added the collection paths to the search.

Make the path arrays have unique values.

Use the `realpath` filter to see the full actual path.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-05-01 06:55:49 -06:00
Rich Megginson
0cd3b7a16f fix: handle_exceptions is not a valid parameter
Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-04-30 06:25:05 -06:00
HVSharma12
91a6c42298 fix: add initial support for sle16+
Signed-off-by: HVSharma12 <harshvardhan.sharma@suse.com>
2026-04-29 08:18:53 -06:00
Rich Megginson
f23d29c22c docs(changelog): version 1.18.0 [citest_skip]
Update changelog and .README.html for version 1.18.0

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-04-28 11:08:51 -06:00
Rich Megginson
b94f3d0993 feat: add role fingerprints to syslog
Feature: Add a fingerprint string to the system log to indicate when the role began
successfully, and when the role finished successfully.  The fingerprint string indicates
the role name, a timestamp, and the platform.

Reason: Users can see when the role was used and if it was used successfully.  This
information from the system log can be collected by log scanners and aggregators
for further analysis.

Result: The role logs fingerprints to the system log.

This also adds a test to check if the fingerprints were written upon a successful
role invocation.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-04-27 08:55:57 -06:00
Rich Megginson
09f4336dee ci: ansible-lint requires dependencies to be installed [citest_skip]
ansible-lint requires the dependencies in meta/collection-requirements.yml
and tests/collection-requirements.yml to be installed.  tox-lsr 3.18.1
will ensure they are installed.

Refactor the tests somewhat so that the collection and test steps are separate.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-04-09 17:13:10 -06:00
Rich Megginson
06d6f36229 ci: Comply with Ansible partner certification checking [citest_skip]
https://github.com/ansible-collections/partner-certification-checker/blob/main/README.md

Unfortunately we cannot use the checkers provided by their team because they assume
the git repo is in collection format - you cannot convert to collection format first
then point the checkers at that collection.  Instead, implement our own checkers that
do the same (and more) - check with multiple versions of ansible-lint and ansible-test
to ensure we cover:

* all supported versions of EL
* Automation Hub gating
* the latest versions of Ansible, including the latest milestone version

This requires the latest version of tox-lsr

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-04-08 16:13:40 -06:00
Rich Megginson
dc993ffea9 test: support ansible-test milestone version 2.22 [citest_skip]
The ansible milestone branch is now version 2.22

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-04-08 15:16:00 -06:00
Rich Megginson
6e5f70687d ci: update header for run_role_with_clear_facts [citest_skip]
Update header for run_role_with_clear_facts to indicate not editable
and clarify what it does

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-04-08 07:39:36 -06:00
Rich Megginson
d56563dc16 refactor: use module.run_command instead of subprocess
Ansible modules should use module.run_command instead of subprocess.
This is flagged by the latest ansible-test

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-04-02 10:36:56 -06:00
Rich Megginson
2044cbf239 refactor: prepare for Ansible partner certification checks
prepare for testing with all stable and milestone ansible-test versions

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-04-02 07:49:24 -06:00
Rich Megginson
8899286efe ci: use codecov @v6 [citest_skip]
use latest version of codecov @v6

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-04-01 12:32:04 -06:00
Rich Megginson
723810328e ci: fix yum repos to use devel site instead of old site name [citest_skip]
Some of the older Testing Farm machines refer to the old site name in the yum repos.
Ensure that they use the correct site name.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-04-01 12:18:16 -06:00
dependabot[bot]
32b0477cfe ci: bump codecov/codecov-action from 5 to 6
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5 to 6.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-01 11:33:38 -06:00
Sergei Petrosian
8a0e3a8e4e tests: Enable EPEL on EL 7 to install hostapd
Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
2026-03-30 10:17:23 -06:00
Sergei Petrosian
397dd13753 tests: Remove installing custom hostapd build for OWE
Previously, the role used to install customly-built hostapd package with
OWE enabled. Currently, hostapd in Fedora and RHEL have OWE enabled by
default, so there is no need to use custom build.

Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
2026-03-30 10:17:23 -06:00
Rich Megginson
88a2609327 test: ensure role gathers the facts it uses by having test clear_facts before include_role
The role gathers the facts it uses.  For example, if the user uses
`ANSIBLE_GATHERING=explicit`, the role uses the `setup` module with the
facts and subsets it requires.

This change allows us to test this.  Before every role invocation, the test
will use `meta: clear_facts` so that the role starts with no facts.

Create a task file tests/tasks/run_role_with_clear_facts.yml to do the tasks
to clear the facts and run the role.  Note that this means we don't need to
use `gather_facts` for the tests.

Some vars defined using `ansible_facts` have been changed to be defined with
`set_fact` instead.  This is because of the fact that `vars` are lazily
evaluated - the var might be referenced when the facts have been cleared, and
will issue an error like `ansible_facts["distribution"] is undefined`.  This is
typically done for blocks that have a `when` condition that uses `ansible_facts`
and the block has a role invocation using run_role_with_clear_facts.yml
These have been rewritten to define the `when` condition using `set_fact`.  This
is because the `when` condition is evaluated every time a task is invoked in the
block, and if the facts are cleared, this will raise an undefined variable error.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-03-19 10:47:09 -06:00
Rich Megginson
ded5545b0d ci: tox-lsr 3.17.1 - previous update broke container tests, this fixes them [citest_skip]
tox-lsr 3.17.1 has a fix for the broken container tests

There was one shell function for both setting up the callback plugins and the connection plugin.
When this function was skipped, the ANSIBLE_CONNECTION_PLUGINS environment variable was not
set, so all subsequent tests failed.  The connection plugin must be present and the env. var.
must be set in order to run any container tests.  The code was fixed to ensure that there is
always a connection plugin installed in the correct location and that ANSIBLE_CONNECTION_PLUGINS
is always set and contains this path.

Also, setting up the callback plugins and the connection plugin is already idempotent, so no
reason to skip them.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-03-13 10:03:22 -06:00
Rich Megginson
490bea3fde ci: tox-lsr 3.17.0 - container test improvements, use ansible 2.20 for fedora 43 [citest_skip]
tox-lsr 3.17.0 has some container test improvements - better output, faster runs

Use Ansible 2.20 for qemu/container tests on fedora 43

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-03-11 06:41:49 -06:00
Rich Megginson
6bb0104b38 ci: tox-lsr 3.16.0 - fix qemu tox test failures - rename to qemu-ansible-core-X-Y [citest_skip]
the latest version of tox 4.49 has a strange issue - it thinks that a tox testenv
like `[qemu-ansible-core-2.20]` is specifying python 2.20 which conflicts with the
testenv basepython of python 3.latest.  There appears to be no way to workaround this.

So, rename all of the testenvs to use `major-minor` instead of `major.minor` e.g.
`[qemu-ansible-core-2-20]`

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-03-09 15:43:31 -06:00
dependabot[bot]
0b22e883d7 ci: bump actions/upload-artifact from 6 to 7
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-02 10:10:29 -07:00
Rich Megginson
a531e880bb ci: Ansible version must be string, not float [citest_skip]
The ansible version is specified as a YAML floating point number.  This causes
`2.20` to be converted to `2.2` which breaks platforms that use ansible 2.20.
Ensure it and similar version numbers are specified in YAML as strings.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-02-17 15:06:59 -05:00
Rich Megginson
792033b74a ci: Add Fedora 43, remove Fedora 41 from Testing Farm CI
Add Fedora 43, remove Fedora 41 from Testing Farm CI

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-02-11 14:28:30 -05:00
Rich Megginson
c295e5b320 ci: tox-lsr version 3.15.0 [citest_skip]
This adds back support for IPv6 in qemu VMs, which appears to be working now.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-02-10 11:20:34 -05:00
Rich Megginson
00f8c0e839 ci: ansible-lint - remove .collection directory from converted collection [citest_skip]
The new ansible-lint@v26 does not like it when there is a .collection directory
with a galaxy.yml in the converted collection, so remove it, since it is not
needed for ansible-lint.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-02-04 16:02:03 -05:00
Rich Megginson
a82cd8eaa4 ci: skip most CI checks if title contains citest skip [citest_skip]
When we submit a PR for a CI update or docs, we do not want to start CI checking
for ansible-lint, qemu, etc.  When we are doing CI updates to 30 or more
roles, this fires off a lot of unnecessary tests, which sometimes causes the
linux-system-roles org in github to be throttled.

When submitting a PR that can skip ci, use "[citest_skip]" in the PR title.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-02-04 08:57:10 -05:00
Rich Megginson
4e30ef51b1 ci: skip most CI checks if title contains citest skip [citest_skip]
When we submit a PR for a CI update or docs, we do not want to start CI checking
for ansible-lint, qemu, etc.  When we are doing CI updates to 30 or more
roles, this fires off a lot of unnecessary tests, which sometimes causes the
linux-system-roles org in github to be throttled.

When submitting a PR that can skip ci, use "[citest_skip]" in the PR title.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-02-04 08:57:10 -05:00
dependabot[bot]
a01c900425 ci: bump ansible/ansible-lint from 25 to 26
Bumps [ansible/ansible-lint](https://github.com/ansible/ansible-lint) from 25 to 26.
- [Release notes](https://github.com/ansible/ansible-lint/releases)
- [Commits](https://github.com/ansible/ansible-lint/compare/v25...v26)

---
updated-dependencies:
- dependency-name: ansible/ansible-lint
  dependency-version: '26'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-03 16:24:29 -05:00
Rich Megginson
be59d1a1d5 docs(changelog): version 1.17.9 [citest skip]
Update changelog and .README.html for version 1.17.9

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-01-13 10:43:25 -05:00
Rich Megginson
c22e1fcd46 ci: use ANSIBLE_INJECT_FACT_VARS=false by default for testing
Ansible 2.20 has deprecated the use of Ansible facts as variables.  For
example, `ansible_distribution` is now deprecated in favor of
`ansible_facts["distribution"]`.  This is due to making the default
setting `INJECT_FACTS_AS_VARS=false`.  For now, this will create WARNING
messages, but in Ansible 2.24 it will be an error.

In order to ensure that commits and PRs conform to this, use
ANSIBLE_INJECT_FACT_VARS=false by default in our CI testing.

Update README-ostree.md if needed.

See https://docs.ansible.com/projects/ansible/latest/porting_guides/porting_guide_core_2.20.html#inject-facts-as-vars

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-01-13 10:29:37 -05:00
Rich Megginson
1c56680451 refactor: use the warn module method on newer Ansible
Starting with Ansible 2.20, modules should not return the `warnings` key in the module
return.  Instead, modules should use the `warn` method to specify the warnings.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-01-13 09:50:08 -05:00
Till Maas
3d7a3f8088 style: Use conscious language for profile list
Signed-off-by: Till Maas <opensource@till.name>
2026-01-08 09:44:03 -05:00
Rich Megginson
22cc86b8e7 docs(changelog): version 1.17.8 [citest skip]
Update changelog and .README.html for version 1.17.8

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-01-07 18:53:09 -05:00
Rich Megginson
39ac91d9af refactor: handle INJECT_FACTS_AS_VARS=false by using ansible_facts instead
Ansible 2.20 has deprecated the use of Ansible facts as variables.  For
example, `ansible_distribution` is now deprecated in favor of
`ansible_facts["distribution"]`.  This is due to making the default
setting `INJECT_FACTS_AS_VARS=false`.  For now, this will create WARNING
messages, but in Ansible 2.24 it will be an error.

See https://docs.ansible.com/projects/ansible/latest/porting_guides/porting_guide_core_2.20.html#inject-facts-as-vars

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-01-07 18:43:15 -05:00
dependabot[bot]
bc67de4f3c ci: bump actions/upload-artifact from 5 to 6
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-02 12:43:55 -05:00
Rich Megginson
a192126a57 ci: add qemu tests for Fedora 43, drop Fedora 41
add qemu tests for Fedora 43, drop Fedora 41

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2025-12-05 17:09:49 -05:00
dependabot[bot]
4e0379ec6e ci: bump actions/checkout from 5 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 13:35:45 -05:00
Rich Megginson
69b231cf30 docs(changelog): version 1.17.7 [citest skip]
Update changelog and .README.html for version 1.17.7

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2025-11-17 12:05:41 -05:00
Rich Megginson
a1129dd121 fix: cannot use community-general version 12 - no py27 and py36 support
community.general version 12 has dropped support for py27 and py36 - ensure that
the roles do not install/use this version - see
https://github.com/ansible-collections/community.general/issues/582

By default, installation will get the latest 11.x version. The lower bound
`6.6.0` is an older version, but I don't want to restrict the ability of a user
of a particular role to use an old version, rather than forcing them to use
`11.x` or later. Some roles like `rhc` explicitly require `6.6.0` or later - I
think this is a reasonable lower bound for all roles.If a role needs a different
version, the role can define its own `community_general_version` in the role's
`host_vars` file in .github.

Standardize file format across all roles for consistency and ease of updating

This update may remove the SPDX license information from the file - this is ok -
the role/project already has a license, this file is trivial, and many
requirements files do not have the license header anyway.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2025-11-15 10:49:31 -05:00
Rich Megginson
60f640b850 ci: bump tox-lsr to 3.14.0 - this moves standard-inventory-qcow2 to tox-lsr
Previously, CI would download the standard-inventory-qcow2 script from pagure.  However,
the pagure download url is now being protected by Anubis which by default
will check the User-Agent header and deny attempts from clients that look
like scrapers or hackers. Rather than trying to play arms race with setting
headers, etc. - just move this script to tox-lsr. If we really need to sync
with the upstream development, we can do that manually.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2025-11-11 09:03:09 -05:00
Rich Megginson
24cedaf566 ci: bump tox-lsr to 3.13.0
fixes ci failure in qemu test related to missing extra_images file

https://github.com/linux-system-roles/tox-lsr/releases/tag/3.13.0
Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2025-11-04 09:30:50 -05:00
Rich Megginson
7089b8412a ci: use versioned upload-artifact instead of master; bump codeql-action to v4; bump upload-artifact to v5
use versioned upload-artifact instead of master

bump codeql-action from v3 to v4

bump upload-artifact from v4 to v5

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2025-11-03 05:47:48 -05:00