#name Run ontap cli command for name
1 messages · Page 1 of 1 (latest)
na_ontap_command is using a ZAPI to send the command.
The warning is unconditional. Maybe you are running different versions of the collection.
The output I get is : TASK [ds-role-nas_CRUD : Run ontap cli command for name service database group] *************************************************************************************************************************************************************
[WARNING]: The module only supports ZAPI and is deprecated, and will no longer work with newer versions of ONTAP when ONTAPI is deprecated in CY22-Q4
[WARNING]: netapp.ontap.na_ontap_rest_cli should be used instead.
changed: [localhost]
TASK [ds-role-nas_CRUD : Run ontap cli command for name service database name_map] **********************************************************************************************************************************************************
changed: [localhost]
TASK [ds-role-nas_CRUD : Run ontap cli command for name service database netgroup] **********************************************************************************************************************************************************
changed: [localhost]
1st command triggers a WARNING
Further 2 more commands do not trigger WARNING
The playbooks are :
-
name: "Run ontap cli command for name service database group"
na_ontap_command:
hostname: "{{ nas_hostname }}"
username: "{{ nas_username }}"
password: "{{ nas_password }}"
command: ['vserver', 'services', 'name-service', 'ns-switch', 'modify', '-vserver', 'vs_{{ target }}', '-database', 'group', '-sources', 'files,nis']
return_dict: true
https: true
validate_certs: false -
name: "Run ontap cli command for name service database name_map"
na_ontap_command:
hostname: "{{ nas_hostname }}"
username: "{{ nas_username }}"
password: "{{ nas_password }}"
command: ['vserver', 'services', 'name-service', 'ns-switch', 'modify', '-vserver', 'vs_{{ target }}', '-database', 'namemap', '-sources', 'files']
return_dict: true
https: true
validate_certs: false -
name: "Run ontap cli command for name service database netgroup"
na_ontap_command:
hostname: "{{ nas_hostname }}"
username: "{{ nas_username }}"
password: "{{ nas_password }}"
command: ['vserver', 'services', 'name-service', 'ns-switch', 'modify', '-vserver', 'vs_{{ target }}', '-database', 'netgroup', '-sources', 'files,nis']
return_dict: true
https: true
validate_certs: false
The only difference is the content of the command.
It's because warnings are only shown once in Ansible. If they are exactly identical, Ansible filters them out.