Hi,
when wild card is used for adapter_names in win_dns_client to set DNS in windows machines, it is not recognizing the interface.
tasks:
- name: Set DNS to Primary Domain Controller
win_dns_client:
adapter_names: 'tap*'
ipv4_addresses: '{{ ad_domain_server }}'
Following is the error.
TASK [Set DNS to Primary Domain Controller] ************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: at <ScriptBlock>, <No file>: line 207
fatal: [X.X.X.X]: FAILED! => {"changed": false, "msg": "Unhandled exception while executing module: Invalid network adapter name: tap*"}
The documentation says wild card is supported and also given example for Ethernet*. When windows instances are provisioned in openstack or kvm using redhat virtio driver, it creates interface with tapxxx format.
Regards
Prakash