network/tests/tasks
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
..
provider add support for ansible-core 2.11 ansible-lint, ansible-test 2021-10-11 12:03:00 -06:00
activate_profile.yml add support for ansible-core 2.11 ansible-lint, ansible-test 2021-10-11 12:03:00 -06:00
assert_device_absent.yml Rename files to be valid python identifiers 2020-04-22 17:40:03 +02:00
assert_device_present.yml Rename files to be valid python identifiers 2020-04-22 17:40:03 +02:00
assert_output_in_stderr_without_warnings.yml library: Separate debug and info logs from warnings 2020-05-06 21:57:34 +02:00
assert_profile_absent.yml test: Fix profile assertion on Fedora 33 2020-12-16 10:39:13 +08:00
assert_profile_present.yml System Roles should consistently use ansible_managed in configuration files it manages 2022-02-25 06:10:42 +08:00
cleanup_802_1x_server.yml Cleaning up ansible-lint errors except '106', '303' and '403' 2021-04-15 20:53:53 +02:00
cleanup_mock_wifi.yml Cleaning up ansible-lint errors except '106', '303' and '403' 2021-04-15 20:53:53 +02:00
cleanup_profile+device.yml add support for ansible-core 2.11 ansible-lint, ansible-test 2021-10-11 12:03:00 -06:00
create_and_remove_interface.yml Rename files to be valid python identifiers 2020-04-22 17:40:03 +02:00
create_bridge_profile.yml add support for ansible-core 2.11 ansible-lint, ansible-test 2021-10-11 12:03:00 -06:00
create_bridge_profile_no_autoconnect.yml add support for ansible-core 2.11 ansible-lint, ansible-test 2021-10-11 12:03:00 -06:00
create_dummy_profile.yml add support for ansible-core 2.11 ansible-lint, ansible-test 2021-10-11 12:03:00 -06:00
create_team_profile.yml add support for ansible-core 2.11 ansible-lint, ansible-test 2021-10-11 12:03:00 -06:00
create_test_interfaces_with_dhcp.yml add support for ansible-core 2.11 ansible-lint, ansible-test 2021-10-11 12:03:00 -06:00
delete_interface.yml add support for ansible-core 2.11 ansible-lint, ansible-test 2021-10-11 12:03:00 -06:00
el_repo_setup.yml Cleaning up ansible-lint errors except '106', '303' and '403' 2021-04-15 20:53:53 +02:00
enable_epel.yml On RHEL 7, enable epel using yum-config-manager 2021-10-06 20:02:12 +02:00
get_current_interfaces.yml Cleaning up ansible-lint errors except '106', '303' and '403' 2021-04-15 20:53:53 +02:00
get_interface_stat.yml Rename files to be valid python identifiers 2020-04-22 17:40:03 +02:00
get_modules_and_utils_paths.yml Cleaning up ansible-lint errors except '106', '303' and '403' 2021-04-15 20:53:53 +02:00
get_NetworkManager_NVR.yml tests: Do not check arch for NM version 2020-08-21 08:43:10 +02:00
get_profile_stat.yml System Roles should consistently use ansible_managed in configuration files it manages 2022-02-25 06:10:42 +08:00
manage_test_interface.yml add support for ansible-core 2.11 ansible-lint, ansible-test 2021-10-11 12:03:00 -06:00
remove+down_profile.yml add support for ansible-core 2.11 ansible-lint, ansible-test 2021-10-11 12:03:00 -06:00
remove_profile.yml add support for ansible-core 2.11 ansible-lint, ansible-test 2021-10-11 12:03:00 -06:00
remove_test_interfaces_with_dhcp.yml test: Fix the bond test on DHCP 2021-07-28 19:50:09 +08:00
run_test.yml add support for ansible-core 2.11 ansible-lint, ansible-test 2021-10-11 12:03:00 -06:00
setup_802.1x.yml Add ca_path option for 802.1x connections 2020-06-15 18:26:34 +02:00
setup_802_1x_server.yml Fix hostapd package installation error 2022-02-21 21:51:38 +01:00
setup_mock_wifi.yml Cleaning up ansible-lint errors except '106', '303' and '403' 2021-04-15 20:53:53 +02:00
setup_mock_wifi_wpa3_owe.yml wifi: Add Opportunistic Wireless Encryption (OWE) support 2021-05-24 10:51:01 +08:00
setup_mock_wifi_wpa3_sae.yml wifi: Add Simultaneous Authentication of Equals(SAE) support 2021-08-09 09:59:22 +08:00
setup_test_interface.yml Forget unmanaged state in NetworkManager 2020-07-11 16:17:06 +02:00
show_interfaces.yml add support for ansible-core 2.11 ansible-lint, ansible-test 2021-10-11 12:03:00 -06:00
start_mock_wifi.yml wifi: Add Opportunistic Wireless Encryption (OWE) support 2021-05-24 10:51:01 +08:00
test_802.1x_capath.yml add support for ansible-core 2.11 ansible-lint, ansible-test 2021-10-11 12:03:00 -06:00