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>
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>
`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>
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>
- 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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Jinja templates should only be at the end of 'name'. This helps with
the identification of tasks inside the source code when they fail.
Signed-off-by: Wen Liang <liangwen12year@gmail.com>