ansible/test/integration/targets/win_dns_client/tasks/main.yml
Jordan Borean bcc23e70e6
win_dns_client - fix bug in devel and added tests (#58971)
* win_dns_client - fix bug in devel and added tests

* Fix sanity issue
2019-07-12 05:36:12 +10:00

28 lines
715 B
YAML

---
- name: create dummy network adapter device
win_device:
path: '%WinDir%\Inf\netloop.inf'
hardware_id: '*msloop'
state: present
register: test_device_name
- set_fact:
test_device_name: '{{ test_device_name.name }}'
- block:
- name: get name of the dummy network adapter
win_shell: (Get-CimInstance -Class Win32_NetworkAdapter -Filter "Name='{{ test_device_name }}'").NetConnectionID
changed_when: False
register: test_adapter
- set_fact:
test_adapter: '{{ test_adapter.stdout | trim }}'
- name: run tests
include_tasks: tests.yml
always:
- name: remove dummy network adapter device
win_device:
name: '{{ test_device_name }}'
state: absent