Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Help with Ansible with YAML setting the quota_target with type tree
2023-11-17
03:56 PM
1,064 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
Solved! See The Solution
1 ACCEPTED SOLUTION
SCL has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please ignore this. I found my mistake. I forgot to update the 'with_items' line appropriately. How to delete this thread?
1 REPLY 1
SCL has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please ignore this. I found my mistake. I forgot to update the 'with_items' line appropriately. How to delete this thread?
