-
name: Gathering DR Cluster Volume Information
netapp.ontap.na_ontap_rest_info:
gather_subset:
- storage/volumes
hostname: "{{ dr_cluster }}"
username: "{{ username }}"
password: "{{ password }}"
https: true
validate_certs: false
fields:
- svm.name
register: drvolumesparameters:
-svm_name: dr_vserver
tags: dr
when: dr_vserver !="none"-
name: build new variable
set_fact:
drvolume1: "{{ drvolumes['ontap_info']['storage/volumes']['records'] }}" -
name: Display variable dr
set_fact:
drvolume2: "{{ item.svm.name }}:{{ item.name }}"
with_items: "{{ drvolume1 }}" -
name: Display variable pr
debug:
var: drvolume2
-
The part I am having trouble with is at the end. I want drvolume2 to contain a list of all the svmnames:itemnames It only assigns the last one. I have looked on the internet to have it build out but nothing has worked as of yet.