network/tests
Noriko Hosoi 79b39792e4 System Roles should consistently use ansible_managed in configuration files it manages
bz#2044640

The network role create an ifcfg file for initscripts. The file
used to append a comment "# this file was created by ansible".
This patch replaces the proprietary string with the ansible
standard {{ ansible_managed }} to adjust to the other system
roles.

For the implementation, it borrowed the method from kernel_settings,
getting the ansible managed comment using the get_ansible_managed.j2
template and pass the comment to network_connections which is added
to the ifcfg file.

In case network_provider is nm, the comment is not added to the
ifcfg file as the file is not managed by Ansible.

Note: the required parameter name to pass the ansible managed comment
to the network_connection module is "__header".

Do not use get_ansible_managed.j2 in the test scripts, but use a
hardcoded ansible managed comment to simplify the tests.

tests/tasks/get_profile_stat.yml: replace the '=' style with the YAML
notation in set_fact.

Signed-off-by: Noriko Hosoi <nhosoi@redhat.com>
2022-02-25 06:10:42 +08:00
..
files Add support for domain-suffix-match 802.1x option 2020-05-04 13:01:41 +02:00
integration fix most ansible-test issues, suppress the rest 2021-04-09 19:57:55 +02:00
playbooks System Roles should consistently use ansible_managed in configuration files it manages 2022-02-25 06:10:42 +08:00
roles/linux-system-roles.network System Roles should consistently use ansible_managed in configuration files it manages 2022-02-25 06:10:42 +08:00
tasks System Roles should consistently use ansible_managed in configuration files it manages 2022-02-25 06:10:42 +08:00
unit Support more bond options 2022-02-11 23:40:34 +01:00
.gitignore Move tests to /tests directory and rename to new naming scheme 2018-05-16 19:48:23 +02:00
covstats fix most ansible-test issues, suppress the rest 2021-04-09 19:57:55 +02:00
ensure_provider_tests.py Support more bond options 2022-02-11 23:40:34 +01:00
get_coverage.sh fix most ansible-test issues, suppress the rest 2021-04-09 19:57:55 +02:00
get_coverage.yml Cleaning up ansible-lint errors except '106', '303' and '403' 2021-04-15 20:53:53 +02:00
get_total_coverage.sh fix most ansible-test issues, suppress the rest 2021-04-09 19:57:55 +02:00
git-post-commit.sh fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
git-pre-commit.sh fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
merge_coverage.sh fix most ansible-test issues, suppress the rest 2021-04-09 19:57:55 +02:00
module_utils Integration tests: Fix coverage collection 2020-04-15 22:12:22 +02:00
modules Integration tests: Fix coverage collection 2020-04-15 22:12:22 +02:00
tests_802_1x_nm.yml should not have removed epel setup from 802 tests 2021-07-29 00:40:40 +08:00
tests_802_1x_updated_nm.yml should not have removed epel setup from 802 tests 2021-07-29 00:40:40 +08:00
tests_auto_gateway_initscripts.yml Disable all initscripts provider tests on Fedora 2022-02-11 21:59:35 +01:00
tests_auto_gateway_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_bond_deprecated_initscripts.yml Disable all initscripts provider tests on Fedora 2022-02-11 21:59:35 +01:00
tests_bond_deprecated_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_bond_initscripts.yml Disable all initscripts provider tests on Fedora 2022-02-11 21:59:35 +01:00
tests_bond_nm.yml test: Fix EL6 repo 2020-12-22 08:14:39 +08:00
tests_bond_options_nm.yml Support more bond options 2022-02-11 23:40:34 +01:00
tests_bridge_initscripts.yml Disable all initscripts provider tests on Fedora 2022-02-11 21:59:35 +01:00
tests_bridge_nm.yml test: Fix EL6 repo 2020-12-22 08:14:39 +08:00
tests_change_indication_on_repeat_run.yml nm: Fix the incorrect change indication for dns option 2021-07-05 20:15:57 +08:00
tests_default.yml test: Fix EL6 repo 2020-12-22 08:14:39 +08:00
tests_default_initscripts.yml Disable all initscripts provider tests on Fedora 2022-02-11 21:59:35 +01:00
tests_default_nm.yml test: Fix EL6 repo 2020-12-22 08:14:39 +08:00
tests_dummy_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_eth_dns_support_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_eth_pci_address_match_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_ethernet_initscripts.yml Disable all initscripts provider tests on Fedora 2022-02-11 21:59:35 +01:00
tests_ethernet_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_ethtool_coalesce_initscripts.yml Disable all initscripts provider tests on Fedora 2022-02-11 21:59:35 +01:00
tests_ethtool_coalesce_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_ethtool_features_initscripts.yml Disable all initscripts provider tests on Fedora 2022-02-11 21:59:35 +01:00
tests_ethtool_features_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_ethtool_ring_initscripts.yml Disable all initscripts provider tests on Fedora 2022-02-11 21:59:35 +01:00
tests_ethtool_ring_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_helpers_and_asserts.yml test: Fix EL6 repo 2020-12-22 08:14:39 +08:00
tests_integration_pytest.yml test: Fix EL6 repo 2020-12-22 08:14:39 +08:00
tests_ipv6_disabled_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_ipv6_dns_search_nm.yml Set DNS search setting only for enabled IP families 2021-12-21 09:18:38 +01:00
tests_ipv6_initscripts.yml Disable all initscripts provider tests on Fedora 2022-02-11 21:59:35 +01:00
tests_ipv6_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_provider_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_reapply_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_regression_nm.yml Disable initscripts tests in rhel-9 2021-07-29 16:44:44 -04:00
tests_route_table_nm.yml Support routing tables in static routes 2022-01-27 18:18:47 +01:00
tests_states_initscripts.yml Disable all initscripts provider tests on Fedora 2022-02-11 21:59:35 +01:00
tests_states_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_switch_provider.yml Disable all initscripts provider tests on Fedora 2022-02-11 21:59:35 +01:00
tests_team_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_team_plugin_installation_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_unit.yml Cleaning up ansible-lint errors except '106', '303' and '403' 2021-04-15 20:53:53 +02:00
tests_vlan_mtu_initscripts.yml Disable all initscripts provider tests on Fedora 2022-02-11 21:59:35 +01:00
tests_vlan_mtu_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_wireless_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_wireless_plugin_installation_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_wireless_wpa3_owe_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_wireless_wpa3_sae_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00