netapp.ontap
netapp.ontap copied to clipboard
na_ontap_dns cluster vs. vserver usage
Summary
Attempting to configure the DNS servers for an ONTAP Cluster via the na_ontap_dns module. The documentation states: With REST, for cluster scoped DNS, omit this option or set it to NULL.
However, it appears that when I omit the parameter, I encounter the following error: Error getting DNS service: could not retrieve UUID of the DNS object
Unsure if this is a documentation error, usage/interpretation issue on my behalf, of the na_ontap_dns module not behaving as desired for REST/Cluster scope.
Component Name
netapp.ontap.na_ontap_dns
Ansible Version
$ ansible --version
ansible [core 2.15.12]
config file = None
...snip...
python version = 3.9.18 (main, Jan 24 2024, 00:00:00) [GCC 11.4.1 20231218 (Red Hat 11.4.1-3)]
jinja version = 3.1.4
libyaml = True
ONTAP Collection Version
$ ansible-galaxy collection list
Collection Version
--------------------- -------
cyberark.pas 1.0.27
netapp.ontap 22.11.0
servicenow.servicenow 1.0.6
ONTAP Version
lab-fas03::> version
NetApp Release 9.12.1: Tue Jan 31 19:19:43 UTC 2023
Playbook
- name: Configure DNS for the cluster
netapp.ontap.na_ontap_dns:
state: present
hostname: "{{ netapp_hostname }}"
username: "{{ netapp_username }}"
password: "{{ netapp_password }}"
domains: "{{ domains }}"
nameservers: "{{ dns1 }}"
use_rest: always
validate_certs: false
vserver: "{{ cluster_name }}"
### Steps to Reproduce
- name: Configure DNS for the cluster
netapp.ontap.na_ontap_dns:
state: present
hostname: "{{ netapp_hostname }}"
username: "{{ netapp_username }}"
password: "{{ netapp_password }}"
domains: "{{ domains }}"
nameservers: "{{ dns1 }}"
use_rest: always
validate_certs: false
Run while omitting the vserver parameter, and using rest.
### Expected Results
I expected with REST, for cluster scoped DNS, I wouldn't have to provide the `vserver` parameter.
### Actual Results
```console
fatal: [localhost]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"cert_filepath": null,
"domains": [
"my.domain.com"
],
"feature_flags": null,
"force_ontap_version": null,
"hostname": "123.123.123.123",
"http_port": null,
"https": false,
"key_filepath": null,
"nameservers": [
"8.8.8.8"
],
"ontapi": null,
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"skip_validation": null,
"state": "present",
"use_rest": "always",
"username": "admin",
"validate_certs": false,
"vserver": null
}
},
"msg": "Error getting DNS service: could not retrieve UUID of the DNS object"
}