NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

General Discussion

Help with Ansible with YAML setting the quota_target with type tree

SCL
1,627 Views

Hi,

 

I am trying to use Ansible with Yaml to set quota rules with type 'tree'. But, I seem unable to set the default quota_target value to "". Any help on how to get this done would be appreciated.

 

Here is my Ansible code snippet:

- name: run ontap na_ontap_quotas
  netapp.ontap.na_ontap_quotas:
    state: "{{ item.state | default('present') }}"
    vserver: "{{ item.vserver }}"
    volume: "{{ item.volume }}"
    quota_target: "{{ item.quota_target | default('""') }}"
    type: "{{ item.type | default('tree') }}"
    disk_limit: "{{ item.disk_limit | default('200GB') }}"
    threshold: "{{ item.threshold | default('180GB') }}"
    soft_file_limit: "{{ item.soft_file_limit | default('160GB') }}"
    policy: "{{ item.policy | default(omit) }}"
    set_quota_status: "{{ item.set_quota_status | default('on') }}"
    <<: *login
  with_items: "{{ qtrees }}"

 

I tried several combinations of double quotes and single quotes and escaping them and each time getting either a linter error or a syntax error (because I seem unable to pass in "" as a literal value for the target).

 

Thanks!

1 ACCEPTED SOLUTION

SCL
1,595 Views

Please ignore this. I found my mistake. I forgot to update the 'with_items' line appropriately. How to delete this thread?

View solution in original post

1 REPLY 1

SCL
1,596 Views

Please ignore this. I found my mistake. I forgot to update the 'with_items' line appropriately. How to delete this thread?

Public