#Hello trying to use the net app on tap
1 messages · Page 1 of 1 (latest)
- name: run ontap cli command
Netapp.ontap.na_ontap_rest_cli:
Hostname: 10.4.1.50
Username: admin
Password: *****
Command: [‘vserver export-policy rule show’]
Verb: GET
Validate_certs: false
I think you mixing up 2 modules
So there the na_ontap_command module -- https://docs.ansible.com/ansible/devel/collections/netapp/ontap/na_ontap_command_module.html#ansible-collections-netapp-ontap-na-ontap-command-module
and there the na_ontap_rest_cli -- https://docs.ansible.com/ansible/devel/collections/netapp/ontap/na_ontap_rest_cli_module.html#ansible-collections-netapp-ontap-na-ontap-rest-cli-module
If your trying to use the rest_cli you need to look at the "using the private CLi passthrough with ONTAP REST API)" guide in the rest documentation https://library.netapp.com/ecmdocs/ECMLP2884821/html/index.html to see how to convert the command.
Hmmmm okay, i went to the Netapp.ontap.na_ontap_command and it says connectionrefusederror 111 connection refused. I know that account can ssh to the box as i just tested and verified
From the documentation.
Requires ontapi and console permissions. Console is not supported for data vservers.
so you need more than SSH for command
I’ll check but I’m pretty sure this admin account has all rights.
I am showing that admin account has console, SSH, HTTP, ONTAPI, SERVICE PROCESSOR and AMQP
Can you try running the debug module https://docs.ansible.com/ansible/devel/collections/netapp/ontap/na_ontap_debug_module.html#ansible-collections-netapp-ontap-na-ontap-debug-module it can give a better idea on what causing the issue
Error as well, Netapp API failed reason - unable to connection (connectionrefusederror 111 connection refused)
It sound like the zapi api isn't running or isn't accessible
Can you try something like this replace username, password, and clustername with yours
curl -kiu USERNAME:PASSWORD -X GET https://CLUSTERNAME/api/storage/aggregates
That returned info and 200 ok message
Do you have https enable?
Other ansible/ api calls are working
ONTAP has 2 API, by default we use REST which is what probably working for you here. This one uses the older ZAPI. Do you have HTTPS enabled?
How do I versify if https is enabled?
I doubt i have it enabled, i usually have the Validate_certs false
in your playbook there https: true
Just add that?
that will cause it to use HTTPS