#Unable to use module "netapp.ontap.na_ontap_quotas" to create quota

1 messages · Page 1 of 1 (latest)

unreal sable
#

I am trying to use this module "netapp.ontap.na_ontap_quotas" under collections "netapp.ontap". But getting an error while executing the playbook.
Below is the error I get.
FAILED! => {"changed": false, "msg": "Error: the python NetApp-Lib module is required. Import error: No module named 'netapp_lib'"}

Below is the playbook that I am using.


  • hosts: exec-node
    collections:

    • netapp.ontap

    tasks:

    • name: quota creation
      netapp.ontap.na_ontap_quotas:
      hostname: "nas.xyz.com"
      username: "admin"
      password: "admin"
      state: present
      vserver: "testsvm"
      volume: "yz75"
      quota_target: "yz75"
      type: tree
      disk_limit: 9
      set_quota_status: True

I have been able to create a volume yz75 and qtree using other modules in netapp ansible. But while using the subjected module for creation of quota. Its getting failed.

Someone please try and help fix this issue.

faint orchid
#

error indicates netapp-lib is missing.

pip install netapp-lib

this should make it work. I think other modules were using REST, this is switching to ZAPI

unreal sable
#

Hi Mohan,

I see below mentioned msg after initiating installation for netapp-lib in python

[user@xyz ~]$ pip3 install netapp-lib
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://xyz.com/repository/python-group/simple
Requirement already satisfied: netapp-lib in ./.local/lib/python3.9/site-packages (2021.6.25)
Requirement already satisfied: xmltodict in ./.local/lib/python3.9/site-packages (from netapp-lib) (0.13.0)
Requirement already satisfied: lxml in ./.local/lib/python3.9/site-packages (from netapp-lib) (4.9.2)
Requirement already satisfied: six in /usr/lib/python3.9/site-packages (from netapp-lib) (1.15.0)
[user@xyz ~]$

Also I am using module "netapp.ontap.na_ontap_volume" for the volume creation and that is working fine.

faint orchid
#

I think na_ontap_volume module is using REST?
netapp-lib is only required for ZAPI not for REST.

module is looking for netapp-lib in different path than the path you have posted.

faint orchid
#

if run playbook with tags -vvv, we get to know where ansible looking for python module search path

faint orchid