Commit Graph
92 Commits
Author SHA1 Message Date
Rich MegginsonandRichard Megginson 5a4a533fee test: add role fingerprints to syslog
Test updates based on testing with bootc and on other platforms.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-04-22 14:45:35 -06:00
Rich MegginsonandRichard Megginson 659d89dd69 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-22 10:52:25 -06:00
Rich MegginsonandRichard Megginson 19b462a7f8 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:16:38 -06:00
Rich MegginsonandRichard Megginson cae72d8dd4 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:18:07 -06:00
Rich MegginsonandRichard Megginson 0732181e3f 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:42:56 -06:00
Rich MegginsonandRichard Megginson 67081a70de 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:21:53 -06:00
Rich MegginsonandRichard Megginson 091570301d 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 09:18:34 -06:00
Rich MegginsonandRichard Megginson 84a356a028 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:06:05 -06:00
Rich MegginsonandRichard Megginson e1680b64f1 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:44:11 -06:00
Rich MegginsonandRichard Megginson 404a1d1ff2 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:46:01 -06:00
dependabot[bot]andRichard Megginson df0cabfea1 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:08:13 -07:00
Rich MegginsonandRichard Megginson 7318859c23 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:09:46 -05:00
Rich MegginsonandRichard Megginson f913d846bb 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:31:29 -05:00
Rich MegginsonandRichard Megginson 4a81d751ad 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:23:47 -05:00
Rich MegginsonandRichard Megginson 6728f85cab 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:06:26 -05:00
Rich MegginsonandRichard Megginson 499a04aa38 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 09:03:27 -05:00
Rich MegginsonandRichard Megginson a73a378eee 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 09:03:27 -05:00
dependabot[bot]andRichard Megginson 69cdc2d420 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:22:22 -05:00
Rich MegginsonandRichard Megginson b1f77838d2 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:33:02 -05:00
Rich MegginsonandRichard Megginson 7ac5ab66d7 docs(changelog): version 1.2.5 [citest skip]
Update changelog and .README.html for version 1.2.5

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-01-07 18:55:16 -05:00
Rich MegginsonandRichard Megginson c9cd2fb359 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 09:29:52 -05:00
Rich MegginsonandRichard Megginson ebf671b9a8 docs(changelog): version 1.2.4 [citest skip]
Update changelog and .README.html for version 1.2.4

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-01-06 10:46:33 -05:00
Rich MegginsonandRichard Megginson 6249961637 docs: fix copyright in license
Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2026-01-05 10:43:10 -05:00
dependabot[bot]andRichard Megginson b3c8b460cf 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:40:45 -05:00
dependabot[bot]andRichard Megginson 11979406a7 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>
2026-01-02 12:40:38 -05:00
Rich MegginsonandRichard Megginson 04db64b712 docs(changelog): version 1.2.3 [citest skip]
Update changelog and .README.html for version 1.2.3

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2025-12-17 11:08:10 -05:00
Rich MegginsonandRichard Megginson 9a65c30112 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:12:26 -05:00
Rich MegginsonandRichard Megginson 783d08440d ci: bump gha checkout from v5 to v6
bump gha checkout from v5 to v6

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2025-12-01 15:48:17 -05:00
Rich MegginsonandRichard Megginson 189c7a6f85 fix: support new config file options, expose aide_version
Cause: The aide role custom config test is using the old configuration options
on newer EL9 systems which use AIDE version 0.17 and later.

Consequence: The test gives errors like "ERROR: /etc/aide.conf:12: unexpected character"
and the test fails.

Fix: The role will now determine the AIDE version, set the new aide_version variable,
and use this variable to determine the old or new style configuration.

Result: The aide system role can process custom config on all supported AIDE
versions.

See https://github.com/aide/aide/blob/master/ChangeLog#L241

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2025-11-24 09:26:37 -05:00
Rich MegginsonandRichard Megginson 21e441ee90 docs(changelog): version 1.2.2 [citest skip]
Update changelog and .README.html for version 1.2.2

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2025-11-17 12:05:06 -05:00
Rich MegginsonandRichard Megginson d5754b7bf7 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:50:08 -05:00
Rich MegginsonandRichard Megginson 2eb5471a39 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:31:06 -05:00
Rich MegginsonandRichard Megginson f946015556 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:37:44 -05:00
Rich MegginsonandRichard Megginson 1d3b95f354 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-04 04:56:14 -05:00
dependabot[bot]andRichard Megginson 4f95a37968 ci: bump actions/upload-artifact from 4 to 5
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-03 04:38:38 -05:00
dependabot[bot]andRichard Megginson a99357503b ci: bump actions/github-script from 7 to 8
Bumps [actions/github-script](https://github.com/actions/github-script) from 7 to 8.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v7...v8)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-06 09:47:54 -06:00
dependabot[bot]andRichard Megginson 70d0432a4e ci: bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [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/v4...v5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-06 09:47:46 -06:00
Rich MegginsonandRichard Megginson d7f26a6e09 ci: use JSON format for __bootc_validation
On some versions of ansible/jinja, the YAML format does not work, so use
the JSON format to pass in __bootc_validation

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2025-09-20 07:08:41 -06:00
Rich MegginsonandRichard Megginson cb7b8ed08a ci: use tox-lsr 3.12.0 for osbuild_config.yml feature
Use tox-lsr 3.12.0 for the new osbuild_config.yml feature for bootc and users
https://github.com/linux-system-roles/tox-lsr/pull/211

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2025-09-19 12:45:19 -06:00
Rich MegginsonandRichard Megginson 1f5c9c9e5e ci: use the new epel feature to enable EPEL for testing farm
Now that https://github.com/teemtee/tmt/pull/3128 has merged
we can use the new epel feature to enable EPEL for testing farm

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2025-09-09 07:46:43 -06:00
Rich MegginsonandRichard Megginson 353535c34e ci: support openSUSE Leap in qemu/kvm test matrix
Some of our system roles now support openSUSE Leap so add this
platform to our testing matrix.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2025-09-08 13:26:56 -06:00
Rich MegginsonandRichard Megginson b7d6ec5ba3 ci: rollout several recent changes to CI testing
* Pass in a YAML true value as `__bootc_validation: true` using
the --extra-vars option to ensure that `__bootc_validation` is
treated as a boolean and not a string value.

`-e "__bootc_validation: true"`

You can also use JSON format:

`-e '{"__bootc_validation": true}'`

but YAML is simpler in this case.

* Use tox-lsr version 3.11.1

* Ensure the citest bad comment works when the test was cancelled in
addition to the failure case.

* Update contributing.md documentation

* Update number of nodes to use in testing farm, if needed

* remove unnecessary ansible-lint skips

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2025-09-05 16:19:19 -06:00
Rich MegginsonandRichard Megginson d00ac1835b docs(changelog): version 1.2.1 [citest skip]
Update changelog and .README.html for version 1.2.1

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2025-07-02 16:45:00 -06:00
Rich MegginsonandRichard Megginson 7ebc20d774 refactor: fix Ansible 2.19 issues
Cannot write to ansible_managed - it is a special variable

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2025-06-26 13:40:09 -06:00
Rich MegginsonandRichard Megginson 387004f5d8 docs(changelog): version 1.2.0 [citest skip]
Update changelog and .README.html for version 1.2.0

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2025-06-16 17:49:01 -06:00
Rich MegginsonandRichard Megginson a12cbffe2c ci: Use ansible 2.19 for fedora 42 testing; support python 3.13
NOTE: This also requires upgrading to tox-lsr 3.11.0

Ansible 2.19 will be released soon and has some changes which will
require fixes in system roles.  This adds 2.19 to our testing matrix
on fedora 42 so that we can start addressing these issues.

python 3.13 is now being used on some platforms.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2025-06-10 09:06:23 -06:00
Rich MegginsonandRichard Megginson 62a517fa97 ci: Add support for bootc end-to-end validation tests
NOTE: This also requires upgrading to tox-lsr 3.10.0, and some
hacks to workaround a podman issue in ubuntu.

These tests run the role during a bootc container image build, deploy
the container into a QEMU VM, boot that, and validate the expected
configuration there. They run in two different tox environments, and
thus have to be run in two steps (preparation in buildah, validation in
QEMU). The preparation is expected to output a qcow2 image in
`tests/tmp/TESTNAME/qcow2/disk.qcow2`, i.e. the output structure of
<https://github.com/osbuild/bootc-image-builder>.

There are two possibilities:

* Have separate bootc end-to-end tests. These are tagged with
`tests::bootc-e2` and are skipped in the normal qemu-* scenarios.
They run as part of the container-* ones.

* Modify an existing test: These need to build a qcow2 image exactly
*once* (via calling `bootc-buildah-qcow.sh`) and skip setup/cleanup
and role invocations in validation mode, i.e. when
`__bootc_validation` is true.

In the container scenario, run the QEMU validation as a separate step in
the workflow.

See https://issues.redhat.com/browse/RHEL-88396

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2025-06-03 16:39:13 -06:00
HVSharma12andRichard Megginson 1f335b613e Drop SLES/openSUSE versions from platforms from meta/main.yml 2025-06-02 10:12:19 -06:00
HVSharma12andRichard Megginson b9d20db08d Add SLES and openSUSE entries to meta/main.yml 2025-06-02 10:12:19 -06:00
HVSharma12andRichard Megginson 2a8586898c feat: add Suse support 2025-06-02 10:12:19 -06:00