Open zoredache opened 4 years ago
Files identified in the description:
If these files are inaccurate, please update the component name
section of the description or use the !component
bot command.
cc @nerzhul click here for bot help
The same here with 1.3.0 of ccommunity.general and it seems that nothing have been adapted since july, however and hopefully, everything still works fixing the version to '1.16' of dnspython.
If someone wants to fix this, feel free to create a PR!
I finally decided to take a look at this problem today after having been vexed by it since July (and basically punting and pinning my copy of dnspython
to 1.16).
In my case (your mileage may vary), we were using a DNS name in the server
argument for nsupdate
instead of an IP address. This seems to have been the cause of our problem. Once I changed that to an IP address, that fixed the issue.
I hadn't previously realized it, but the server
argument states pretty clearly:
Apply DNS modification on this server, specified by IPv4 or IPv6 address.
In my case, I just used {{ lookup('dig', nameserver) }}
to get the first IP address for our server and everything worked fine
after that.
Examples in the docs (going back at least to 2.9) used IP addresses, but the documentation in 2.9 indicated Apply DNS modification on this server
, and didn't specifically call out the requirements to an IP address. This tightened restriction is caused by changes in the underlying dnspython
package.
At this point, considering the now-clear documentation, I've now "fixed" our code. I'm putting this comment in here for anyone else who runs into this problem and thinks they need to pin to an older version of dnspython
while waiting for a "fix".
I have issues with the module as well. In my Fedora 34, dns-python is 2.1.0. I cannot downgrade, it's the lowest possible version.
When I try to create a reverse DNS entry it fails with rc 5 (refused) I noticed this:
dns_rc: 5
dns_rc_str: REFUSED
invocation:
module_args:
key_algorithm: hmac-sha512
key_name: <keyname>
key_secret: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
port: 53
protocol: tcp
record: 32.0.10.10.in-addr.arpa.
server: 10.0.0.1
state: present
ttl: 3600
type: PTR
value:
- demo.example.com.
zone: null
The same code if executed on my openSUSE Leap 15.3 which has dnspython 1.15 works perfectly fine.
Now, the solution to this issue was to add the zone. I don't want to express any opinion on the dnspython library, I am not a python expert by any means. However, the documentation of the nsupdate Ansible module must be updated to reflect this need. I don't have an issue to create the PR as long as someone will merge it.
@itcultus would be great if you could create a PR. I'll happily merge it if it looks good to me and nobody else chimes in :)
I will open a new case, since I cannot replicate the issue with server name.
Files identified in the description:
If these files are incorrect, please update the component name
section of the description or use the !component
bot command.
SUMMARY
The dnspython 2.0.0 was released on 2020-07-17. The updated module seems to break the ansible nsupdate module. If I downgrade dnspython back to 1.16.0 everything seems to work fine.
ISSUE TYPE
COMPONENT NAME
nsupdate
ANSIBLE VERSION
CONFIGURATION
No changed config, default.
OS / ENVIRONMENT
Debian 10, ansible installed via pip.
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS