Software Development Kit (SDK) and API Discussions

ansible netapp.ontap.na_ontap_quotas -> create quotas -> missing idempotency

Thomas2
1,401 Views

Hi,
I want to manage the netapp user quotas via ansible.  I have tried the following.


- name: Add/Set quota rule for type user
netapp.ontap.na_ontap_quotas:
state: present
vserver: testsvm3
volume: test2
quota_target: "542,751"
type: user
disk_limit: 300MB
set_quota_status: True

 

At second run ansible complains. Is there a workaround for missing idempotency, as I want to run the code in a pileline ?

 

 

TASK [Add/Set quota rule for type user] ************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Error on creating quotas rule: calling: storage/quota/rules: got {'message': 'duplicate entry', 'code': '1', 'target': 'uuid'}."}

 

Thanks in advance.

BR

 Thomas

1 REPLY 1

RossC
777 Views

Hi @Thomas2 

 

Apologies that no one's been able to get you an answer to your Ansible query. Might I suggest you consider jumping on our NetApp Community Discord. There is an #Ansible channel that is fairly active, so I think you may have a better chance of getting the answer you are looking for there.

 

You can jump on our Community Discord by heading to https://discord.gg/NetApp 

 

Public