- name:get result of disable a single adapter test
win_shell:'{{ get_netbios_script }}'
changed_when:no
register:set_single_actual
- name:assert disable a single adapter
assert:
that:
- set_single_check is changed
- set_single_actual.stdout_lines == ["2"]
- name:fail with invalid network adapter name
win_netbios:
state:disabled
adapter_names:
- FakeAdapterName
register:invalid_adapter
failed_when:invalid_adapter.msg != "Not all of the target adapter names could be found on the system. No configuration changes have been made. FakeAdapterName"
- name:disable netbios all adapters (check mode)
win_netbios:
state:disabled
check_mode:yes
register:disable_check
- name:assert disable netbios (check mode)
assert:
that:
- disable_check.changed
- name:disable netbios all adapters
win_netbios:
state:disabled
register:netbios_disable
- name:assert netbios disabled
assert:
that:
- netbios_disable.changed
- name:test disable idempotence
win_netbios:
state:disabled
register:netbios_disable
- name:test disable idempotence
assert:
that:
- not netbios_disable.changed
- name:enable netbios all adapters (check mode)
win_netbios:
state:enabled
check_mode:yes
register:enable_check
- name:assert enable netbios all adapters (check mode)