Alrighty
So I’m behind the curve and am updating all of my collections and testing out playbooks here and there, and I noticed along the way that from between community.windows 1.1.0 to 1.6.0 that there has been a major change to how this module is handling computer_name:
Namely, right before I updated it, I tested the playbook and it ran without incident.
immediately after, I ran it, and failures abound.
Using module file /root/.ansible/collections/ansible_collections/community/windows/plugins/modules/win_dns_record.ps1
Pipelining is enabled.
< Windows_ansible_host.DOMAIN.net > ESTABLISH WINRM CONNECTION FOR USER: SA_REDACTED_Domain@DOMAIN.NET on PORT 5986 TO l1pnchwmgt12.columbuschildrens.net
EXEC (via pipeline wrapper)
ok: [Windows_ansible_host.DOMAIN.net] => {
“changed”: false,
“invocation”: {
“module_args”: {
“computer_name”: “DNSserverredacted.DOMAIN.net”,
“name”: “deleteme”,
“port”: null,
“priority”: null,
“state”: “present”,
“ttl”: 3600,
“type”: “A”,
“value”: [
“10.60.24.121”
],
“weight”: null,
“zone”: “DOMAIN.net”
}
}
}
The above are the results for what worked in 1.1.0.
Immediately after update, it appears that the Computer_name: field is being entirely ignored and this module is trying to process the request locally, seeing as my ansible node isn’t a DNS server, domain controller, or anything special, its failing every time with a complete inability to find the DNS Zone, duh.
The full traceback is:
Failed to get the zone information for DOMAIN.net on server Windows_ansible_host.
At line:73 char:12
- $records = Get-DnsServerResourceRecord -ZoneName $zone -Name $name -R …
-
- CategoryInfo : NotSpecified: (columbuschildrens.net:root/Microsoft/…rResourceRecord) [Get-DnsServerResourceRecord], CimException
- FullyQualifiedErrorId : WIN32 1722,Get-DnsServerResourceRecord
ScriptStackTrace:
at Get-DnsServerResourceRecord, : line 3130
at , : line 73
Microsoft.Management.Infrastructure.CimException: Failed to get the zone information for DOMAIN.net on server Windows_ansible_host.DOMAIN.
Am I mishandling something here?
I’ve attempted FQDN, NetBios name and IP addr for computer_name, and nothing is successful.
it is a VERY simplistic playbook for simply testing the module that it will work.
I can post it if necessary.
Thanks
Jess