mirror of
https://github.com/linux-system-roles/network.git
synced 2026-07-18 17:05:13 +00:00
The NetworkManager in Fedora 33 does not use ifcfg-rh plugin by default,
the CI will fail on Fedora 33 with:
```
TASK [assert that profile 'bond0' is present] **********************************
task path: /tmp/tmpaz9m374e/tests/playbooks/tasks/assert_profile_present.yml:4
fatal: [/cache/fedora-33.qcow2]: FAILED! => {
"assertion": "profile_stat.stat.exists",
"changed": false,
"evaluated_to": false,
"msg": "profile /etc/sysconfig/network-scripts/ifcfg-bond0 does not exist"
}
```
Previously, we are checking the existence of
`/etc/sysconfig/network-scripts/` to determine whether ifcfg-rh plugin
is enabled. This is incorrect on Fedora 33.
The fix is checking the FILENAME[1] used for storing the NetworkManager
connection, the profile is considered as exists when it exists and does
not contains `/run`.
Since we cannot tell which provider we are using, we just check both
initscripts files and NetworkManager connections.
[1]: nmcli -f NAME,FILENAME connection show
Signed-off-by: Gris Ge <fge@redhat.com>
|
||
|---|---|---|
| .. | ||
| files | ||
| integration | ||
| playbooks | ||
| roles/linux-system-roles.network | ||
| tasks | ||
| unit | ||
| .gitignore | ||
| covstats | ||
| ensure_provider_tests.py | ||
| get_coverage.sh | ||
| get_coverage.yml | ||
| get_total_coverage.sh | ||
| merge_coverage.sh | ||
| module_utils | ||
| modules | ||
| setup_module_utils.sh | ||
| tests_802_1x_nm.yml | ||
| tests_802_1x_updated_nm.yml | ||
| tests_bond_initscripts.yml | ||
| tests_bond_nm.yml | ||
| tests_bridge_initscripts.yml | ||
| tests_bridge_nm.yml | ||
| tests_default.yml | ||
| tests_default_initscripts.yml | ||
| tests_default_nm.yml | ||
| tests_ethernet_initscripts.yml | ||
| tests_ethernet_nm.yml | ||
| tests_ethtool_features_initscripts.yml | ||
| tests_ethtool_features_nm.yml | ||
| tests_helpers_and_asserts.yml | ||
| tests_integration_pytest.yml | ||
| tests_provider_nm.yml | ||
| tests_reapply_nm.yml | ||
| tests_regression_nm.yml | ||
| tests_states_initscripts.yml | ||
| tests_states_nm.yml | ||
| tests_team_nm.yml | ||
| tests_unit.yml | ||
| tests_vlan_mtu_initscripts.yml | ||
| tests_vlan_mtu_nm.yml | ||
| tests_wireless_nm.yml | ||