#Invalid configuration of quota using module "netapp.ontap.na_ontap_quotas"

1 messages · Page 1 of 1 (latest)

fluid turret
#
  • name: quota creation
    collections:
    - netapp.ontap
    netapp.ontap.na_ontap_quotas:
    hostname: "{{ host_name }}"
    username: "{{ username }}"
    password: "{{ password }}"
    state: present
    vserver: "{{ svm }}"
    volume: "{{ finalvolname }}"
    quota_target: "{{ finalvolumenumber }}-01"
    #quota_target: "/vol/{{ finalvolname }}"
    type: tree
    disk_limit: "{{ quota_size | int }}"
    set_quota_status: True
    validate_certs: "{{ validate_certs | default ('false') }}"
    use_rest: always

When I use this module "netapp.ontap.na_ontap_quotas" with above mentioned parameters I get the below configuration on NAS wherein Target is getting configured to all qtrees. However I just needed to map it with a single qtree. The qtree I am using in quota_target parameter is already existing in the NAS.

nas::> quota policy rule show -vserver nas2-testsvm -volume yz183 -instance

             Vserver: testsvm
         Policy Name: default
         Volume Name: yz183
                Type: tree
              Target: ""
          Qtree Name: ""
        User Mapping: -
          Disk Limit: 921.6MB
         Files Limit: -

Threshold for Disk Limit: -
Soft Disk Limit: -
Soft Files Limit: -

Someone please help on this. @hallow axle If possible kindly suggest on this.

worldly quartz
#
volume: "{{ volume_name }}"```

should solve your problem. The quota target is only the qtree name
hallow axle
#

yes quota_target should be qtree name for type: tree
@fluid turret is "{{ finalvolumenumber }}-01" is a qtree?

fluid turret
#

Yes @hallow axle "{{ finalvolumenumber }}-01" .. This is the qtree that I created already...

hallow axle
#

I tried create qtree and apply quotas to it , its working fine.

`- name: Create qtree
na_ontap_qtree:
name: "{{ qtree_name }}"
flexvol_name: "{{ test_volume }}"
vserver: "{{ test_vserver }}"
<<: *login

  • name: Create and reinitialize Quota
    na_ontap_quotas:
    state: present
    volume: "{{ test_volume }}"
    quota_target: "{{ qtree_name }}"
    type: tree
    disk_limit: "{{ qtree_size }}"
    set_quota_status: True
    activate_quota_on_change: reinitialize
    vserver: "{{ test_vserver }}"
    <<: *login`

Then check in cli

`ontap_cluster_1::> quota policy rule show -vserver ansibleSVM -volume ansibleVolume12

Vserver: ansibleSVM Policy: default Volume: ansibleVolume12

                                           Soft             Soft
                     User         Disk     Disk   Files    Files

Type Target Qtree Mapping Limit Limit Limit Limit Threshold


tree "" "" - - - - - -
tree ansibleQtree12
"" - 5MB - - - -
2 entries were displayed.`

#

whats the ONTAP Ansible collection version?