Commit graph

767 commits

Author SHA1 Message Date
Rich Megginson
a9f20cb87b ci: tox-lsr version 3.1.1
This is primarily for the update to ansible-plugin-scan to
work with the upcoming ostree changes, but also includes
some minor fixes which affect ci.
3.1.0 was released but not used due to a bug fixed in 3.1.1
See full release notes for 3.1.0 and 3.1.1
https://github.com/linux-system-roles/tox-lsr/releases

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-10-11 08:25:08 -06:00
Rich Megginson
e82aca60d0 ci: use dump_packages.py callback to get packages used by role
This adds the dump_packages.py callback which will dump the
arguments to the `package` module (except for `state: absent`)
to the integration test run logs.  The output looks like this:
`lsrpackages: pkg-a pkg-b ...`
We will have tooling which will scrape the logs to extract the
packages used at runtime and testing for all of the supported
combinations of distribution and version.

This also ensures the weekly-ci PR git commit message conforms
to commitlint.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-10-05 18:01:49 -06:00
Rich Megginson
2d41de3412 docs: Ensure badges are sorted consistently
Ensure badges are sorted so that future updates are
consistent and in a stable order.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-10-05 17:39:51 -06:00
Rich Megginson
3ff75152c2 ci: ensure dependabot git commit message conforms to commitlint
Ensure dependabot git commit message conforms to commitlint

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-10-05 17:39:51 -06:00
Wen Liang
ca2180e659 test: Remove bond tests tag expfail
Since the root cause of the bond tests failure is already found and
fixed (by the commit 'fix: Add dhcp client package dependency for
initscripts provider'). Therefore, remove the bond tests tag `expfail`
and enable the bond tests in the downstream testing.

Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2023-10-05 15:11:02 -06:00
Wen Liang
62c78f4fe0 fix: Add dhcp client package dependency for initscripts provider
Initscripts provider requires `/sbin/dhclient` to obtain DHCP address,
which is shipped in dhcp client package. But the managed hosts may not
already install the dhcp client package, thus, add it as the dependency
package for initscripts provider.

Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2023-10-05 15:11:02 -06:00
Wen Liang
17922ca6f3 fix: Install yum-utils package
`yum-config-manager` is provided by the yum-utils package, thus, install
the package as the dependency before using `yum-config-manager`.

Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2023-10-05 15:11:02 -06:00
dependabot[bot]
1801ae7870 build(deps): bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [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/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-02 14:56:28 -06:00
Wen Liang
94254894de test(infiniband): Negate the error message in assertion
Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2023-09-25 14:40:16 -06:00
Wen Liang
b97c9bd01e test: Use variable to hold infiniband interface name
To avoid hard coded interface name used all over the place in
`tests_infiniband.yml`, specify a variable to hold the infiniband
interface name instead.

Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2023-09-25 14:40:16 -06:00
Sergei Petrosian
7b815366a0
docs(changelog): version 1.13.2 [citest skip] (#634)
Update changelog and .README.html for version 1.13.2

Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
2023-09-08 15:15:19 +02:00
Wen Liang
2b8fbe971f docs: Update README.md
Updating README.md to reflect some recently added changes or features.

Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2023-09-06 14:48:19 -06:00
Sergei Petrosian
44e5983185
ci: Remove badges from README.md prior to converting to HTML (#633)
- Remove thematic break after badges
- Remove badges from README.md prior to converting to HTML

Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
2023-08-28 12:16:58 +02:00
Sergei Petrosian
cd7eafe009
ci: Make badges consistent, run markdownlint all .md files (#631)
- Consistently generate badges for GH workflows in README RHELPLAN-146921
- Run markdownlint on all .md files
- Add custom-woke-action if not used already
- Use woke from linux-system-roles/lsr-woke-action

Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
2023-08-24 08:19:05 +02:00
Sergei Petrosian
4dd282e0c5 ci: Add markdownlint, test_html_build, and build_docs workflows
- markdownlint runs against README.md to avoid any issues with
  converting it to HTML
- test_converting_readme converts README.md > HTML and uploads this test
  artifact to ensure that conversion works fine
- build_docs converts README.md > HTML and pushes the result to the
  docs branch to publish dosc to GitHub pages site.
- Fix markdown issues in README.md

Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
2023-08-14 08:51:31 -06:00
Rich Megginson
666f9cb333 docs(changelog): version 1.13.1 [citest skip]
Create changelog update and release for version 1.13.1

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-07-20 13:33:40 -06:00
Rich Megginson
751c3fffca fix: facts being gathered unnecessarily
Cause: The comparison of the present facts with the required facts is
being done on unsorted lists.

Consequence: The comparison may fail if the only difference is the
order.  Facts are gathered unnecessarily.

Fix: Use `difference` which works no matter what the order is.  Ensure
that the fact gathering subsets used are the absolute minimum required.

Result: The role gathers only the facts it requires, and does
not unnecessarily gather facts.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-07-14 15:23:56 -06:00
Rich Megginson
a83b157591 ci: ansible-test ignores file for ansible-core 2.15
Need a new ignores file for ansible-core 2.15 ansible-test

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-07-13 10:35:55 -06:00
Rich Megginson
e16b0e65ff ci: ansible-lint - ignore var-naming[no-role-prefix]
ansible-lint has recently added a check for this.  It flags a lot of our test
code, and some of our role code that uses nested roles.
There is no easy way to disable it for these cases only.  It would be a
tremendous amount of work to add `# noqa` comments everywhere.
The use of `.ansible-lint-ignore` would be a maintenance burden (cannot use
tests/tests_*.yml or other similar wildcard to match all test files), would
still issue a lot of warning messages, and would not solve all of the problems.
The only way for now is to skip this rule.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-07-13 09:36:55 -06:00
Rich Megginson
104638e765 docs(changelog): version 1.13.0 [citest skip]
Create changelog update and release for version 1.13.0

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-07-10 10:50:23 -06:00
Wen Liang
835872e681 feat: Support "no-aaaa" DNS option
reason: The administrator wants to suppress the AAAA queries made by
the stub resolver, including AAAA lookups triggered by NSS-based
interfaces such as getaddrinfo. Only the DNS lookups are affected.

result: The administrator is able to suppress AAAA queries made by the
stub resolver.

Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2023-06-29 13:10:20 +02:00
Rich Megginson
4371036f14 ci: fix python 2.7 CI tests by manually installing python2.7 package
We use the setup-python github action.  This has dropped support for
python 2.7.  Instead, just manually install the python2.7 package.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-06-28 16:04:06 -06:00
Sergei Petrosian
e791fb9440 ci: Rename commitlint to PR title Lint, echo PR titles from env var
Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
2023-06-22 07:42:01 +02:00
Sergei Petrosian
f07e275282 ci: Add pull request template and run commitlint on PR title only
We now ensure the conventional commits format only on PR titles and not on
commits to let developers keep commit messages targeted for other developers
i.e. describe actual changes to code that users should not care about.
And PR titles, on the contrary, must be aimed at end users.

For more info, see
https://linux-system-roles.github.io/contribute.html#write-a-good-pr-title-and-description

Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
2023-06-13 11:23:21 -06:00
Rich Megginson
391617cc5c ci: Use tox-lsr 2.13 for py26
tox-lsr 3.x does not support python 2.6, so use tox-lsr 2.13 for
py26 testing.  This should be fine until we can drop support for
python 2.6

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-06-05 12:40:29 -06:00
Ole Pannbacker
c2f89a78b9 feat: add AlmaLinux to RHEL compat distro list
Signed-off-by: Ole Pannbacker <opannbacker@cronon.net>
2023-06-01 16:23:16 -06:00
Rich Megginson
4b7663ce7e docs(changelog): version 1.12.0 [citest skip]
Create changelog update and release for version 1.12.0

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-05-30 13:34:16 -06:00
Wen Liang
ffe01a5f8b feat: Support ipv4_ignore_auto_dns and ipv6_ignore_auto_dns settings
reason: The user wants to ignore automatically configured name servers and
search domains (e.g. dns record from DHCP), and only use the name
servers and search domains specified in the `dns` and `dns_search`
properties.

result: The user is able to ignore automatically configured name servers
and search domains.

Notice that there are two settings here distinguished by the address
families, which aims to be compatible with NetworkManager
(`ipv4.ignore-auto-dns` and `ipv6.ignore-auto-dns`)and Nmstate (setting
`auto-dns` on `ipv4` or `ipv6` section). Also, the users can get auto
DNS from DHCPv4, DHCPv6, modem etc, and they may want to ignore auto
DNS on Ipv4 but not on IPv6, in this case, it is better to have two
settings distinguished by the address families.

Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2023-05-29 12:56:41 +02:00
Rich Megginson
2ce6f3afa7 ci: update tox-lsr to version 3.0.0
The major version bump is because tox-lsr 3 drops support
for tox version 2.  If you are using tox 2 you will need to
upgrade to tox 3 or 4.

tox-lsr 3.0.0 adds support for tox 4, commitlint, and ansible-lint-collection

See https://github.com/linux-system-roles/tox-lsr/releases/tag/3.0.0
for full release notes

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-05-17 10:17:19 -06:00
Rich Megginson
fd92063502 docs: Consistent contributing.md for all roles - allow role specific contributing.md section
Provide a single, consistent contributing.md for all roles.  This mostly links to
and summarizes https://linux-system-roles.github.io/contribute.html

Allow for a role specific section which typically has information about
role particulars, role debugging tips, etc.

Fix several markdown consistency issues, other issues found by markdownlint
Use https://www.markdownguide.org/basic-syntax#alternate-syntax style for
headings, using `### heading3`, `#### heading4`, etc. for lower level
headings.

See https://github.com/linux-system-roles/.github/pull/19

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-05-10 14:23:20 -06:00
Rich Megginson
abc370a2e0 docs(changelog): version 1.11.4 [citest skip]
Create changelog update and release for version 1.11.4

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-04-28 13:22:37 -06:00
Rich Megginson
c144794faa style: ansible-lint - remove line-length files from .yamllint.yml
Rather than having to maintain .yamllint.yml with a list of files
exempt from yamllint line-length checking, either fix the code
to abide by the line length restriction, or put the yamllint
exceptions in-line in the code.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-04-28 09:41:30 -06:00
Rich Megginson
211412d035 style: ansible-lint - fix missing YAML document start
ansible-lint requires that YAML documents begin with a line
consisting of `---`

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-04-28 09:15:50 -06:00
Rich Megginson
c0a626ddbb style: Use standard Ansible braces and brackets spacing
Use standard Ansible spacing for braces and brackets.  This
allows us to remove those rule exceptions from .yamllint.yml

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-04-28 09:13:55 -06:00
Sergei Petrosian
7884537284 ci: Add commitlint GitHub action to ensure conventional commits with feedback
For more information, see Conventional Commits format in Contribute
https://linux-system-roles.github.io/contribute.html#conventional-commits-format

Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
2023-04-28 14:36:36 +02:00
Wen Liang
b02e58db76 Fix the failure of running ANSIBLE_GATHERING=explicit on tests_switch_provider.yml
The test `tests_switch_provider.yml` fails to run with
`ANSIBLE_GATHERING=explicit` with the error described below. Therefore,
include the task 'el_repo_setup.yml' before running the test which
supports gathering the minimum subset of facts required.

```
TASK [set fact to use initscripts network_provider]
task path: /tmp/tmp.Q6nP8W4iPS/rhel_system_roles/tests/network/playbooks/tests_switch_provider.yml:8
fatal: [/tmp/tmp.Q6nP8W4iPS/RHEL_8_8_TESTING.qcow2]: FAILED! => {}
MSG:
The conditional check 'ansible_distribution in ['CentOS', 'RedHat'] and
ansible_distribution_major_version in ['7', '8']' failed. The error
was: error while evaluating conditional (ansible_distribution in
['CentOS', 'RedHat'] and ansible_distribution_major_version in
['7', '8']): 'ansible_distribution' is undefined.
```

Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2023-04-27 15:14:49 -06:00
Rich Megginson
ee2a8eb177 docs(changelog): version 1.11.3 [citest skip]
Create changelog update and release for version 1.11.3

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-04-14 09:01:34 -06:00
Wen Liang
46f827419e ansible-lint: Remove the rule 'load-failure' from 'warn_list'
The rule 'load-failure' is unskippable, you cannot use it in
'skip_list' or 'warn_list'.

Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2023-04-10 17:49:07 +02:00
Wen Liang
af76d08550 ansible-lint: Enable the check on 'tests/' directory
Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2023-04-10 17:49:07 +02:00
Wen Liang
5ff1189409 ansible-lint: Fix name[missing] and name[play] failures
Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2023-04-10 17:49:07 +02:00
Wen Liang
aa3b6bd8dc ansible-lint: Fix remaining name[casing] warnings
More name[casing] warnings are discovered by ansible-lint,
this may be due to the upgrade of ansible-lint.

Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2023-04-05 16:52:39 -06:00
Wen Liang
b1d2f305c2 ansible-lint: Fix remaining jinja[spacing] warnings
Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2023-04-05 16:44:41 -06:00
Wen Liang
2de826ee24 ansible-lint: Fix yaml[octal-values] failures
Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2023-04-04 09:52:31 -06:00
Noriko Hosoi
77214cbda4 Fingerprint RHEL System Role managed config files
- Add role name to the generated config files.
  # system_role:network

Signed-off-by: Noriko Hosoi <nhosoi@redhat.com>
2023-03-30 13:38:19 -06:00
Wen Liang
2b693d14c0 ansible-lint: Fix no-changed-when failure
Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2023-03-29 13:10:38 +02:00
Rich Megginson
7f26cdb8ac in lsr_assert_when use condition instead of when
ansible-lint is confused by the use of `when:` with `lsr_assert_when`.
It thinks the `when` string should be evaluated as a Jinja expression
but it is really just a plain string.  To make this more friendly to
ansible-lint, use `condition:` instead of `when:` with
`lsr_assert_when`.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-03-28 18:26:33 -06:00
Wen Liang
8eed9ae4a9 ansible-lint: Fix ignore-errors failures
In some test playbooks, the `ignore_errors: true` can not be replaced
by `changed_when: false`, because `changed_when` is not a valid
attribute for a IncludeRole.

Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2023-03-28 18:41:23 +02:00
Wen Liang
8a3dd3c438 ansible-lint: Fix command-instead-of-module failures
Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2023-03-28 18:40:13 +02:00
Noriko Hosoi
b80e178fc5 Add README-ansible.md to refer Ansible intro page on linux-system-roles.github.io
Signed-off-by: Noriko Hosoi <nhosoi@redhat.com>
2023-03-27 11:04:41 -06:00
Wen Liang
8174d5320d ansible-lint: Fix jinja[spacing] warnings
Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2023-03-27 16:25:03 +02:00