test: Purge DNS config at the end of tests_network_state.yml

Without purging the DNS testing config at the end
`tests_network_state.yml`, the managed hosts can not properly resolve
certain hosts (e.g. mirrors.fedoraproject.org, mirrors.centos.org )
in the package installation task of other tests.

Signed-off-by: Wen Liang <liangwen12year@gmail.com>
This commit is contained in:
Wen Liang 2024-02-13 08:32:07 -05:00 committed by Richard Megginson
parent b4f51e2691
commit c6be8dfde5

View file

@ -173,6 +173,14 @@
msg: the file `/run/NetworkManager/no-stub-resolv.conf` does not
contain the specified DNS configuration
- name: Purge the DNS
import_role:
name: linux-system-roles.network
vars:
network_state:
dns-resolver:
config: {}
- name: Include the task 'delete_interface.yml'
include_tasks: tasks/delete_interface.yml
- name: Include the task 'assert_device_absent.yml'