#Hello trying to use the net app on tap

1 messages · Page 1 of 1 (latest)

tall cypress
#

Can you show us your playbook

lapis slate
#
  • 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
tall cypress
#

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.

lapis slate
#

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

tall cypress
#

From the documentation.

Requires ontapi and console permissions. Console is not supported for data vservers.

so you need more than SSH for command

lapis slate
#

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

tall cypress
lapis slate
#

Error as well, Netapp API failed reason - unable to connection (connectionrefusederror 111 connection refused)

tall cypress
#

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

lapis slate
#

That returned info and 200 ok message

tall cypress
#

Do you have https enable?

lapis slate
#

Other ansible/ api calls are working

tall cypress
#

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?

lapis slate
#

How do I versify if https is enabled?

#

I doubt i have it enabled, i usually have the Validate_certs false

tall cypress
#

in your playbook there https: true

lapis slate
#

Just add that?

tall cypress
#

that will cause it to use HTTPS