That issue appears to have been fixed in the collection, but the change has
not been included in a release yet:

https://github.com/ansible-collections/community.windows/pull/277

On Tue, Sep 14, 2021 at 10:24 AM [email protected] <[email protected]>
wrote:

> 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:
> [email protected] 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<End>, <No file>: line 3130
> at <ScriptBlock>, <No file>: 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
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/2cc179e8-a9ab-4d5c-9735-c18194b04180n%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/2cc179e8-a9ab-4d5c-9735-c18194b04180n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Matt Martz
@sivel
sivel.net

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAD8N0v9-h9X%2Bx%2B9wBufUKy1gSdguuhh8%2BfKkMxF6pyQXHZKNGg%40mail.gmail.com.

Reply via email to