Debian Codegraph @

ansible_collections/netapp/ontap/roles/na_ontap_vserver_delete/tasks/get_volumes.yml

raw
1 ---
2 # tasks file for ansible_collections/netapp/ontap/roles/na_ontap_vserver_delete
3
4 - name: Collect volumes for vserver
5 tags: gather
6 netapp.ontap.na_ontap_rest_info:
7 gather_subset:
8 - volume_info
9 parameters:
10 svm.name: "{{ vserver_name }}"
11 is_svm_root: false # we can't delete it, but it'll be removed with the vserver
12 clone.is_flexclone: "{{ is_flexclone | default(omit) }}"
13 fields: name
14 hostname: "{{ netapp_hostname }}"
15 username: "{{ netapp_username }}"
16 password: "{{ netapp_password }}"
17 https: "{{ https }}"
18 validate_certs: "{{ validate_certs }}"
19 register: ontap
20 - name: Debug
21 ansible.builtin.debug:
22 var: ontap
23 when: debug_level > 1
24 - name: Extract volume names
25 ansible.builtin.set_fact:
26 volumes: "{{ ontap.ontap_info | json_query(get_attrs) }}"
27 vars:
28 # double quotes around storage/volumes to escape the /
29 get_attrs: '"storage/volumes".records[].name'
30 - name: Debug
31 ansible.builtin.debug:
32 var: volumes
33 when: debug_level > 0