Hello all,
I query the aggregates as follows and then want to store the percentage level per aggregate in a variable:
- name: Aggregate Informationen für den Primary Cluster abfragen
netapp.ontap.na_ontap_rest_info:
gather_subset:
- aggregate_info
fields:
- 'space'
https: true
use_rest: always
validate_certs: false
hostname: "{{ primaryCluster }}"
username: "{{ username }}"
password: "{{ password }}"
register: primaryAggregateInfo
However, with the new Rest module I still do not manage to loop the aggregates. Does anyone have an idea how this works?
-
name: Aggregate Liste für den Primary Cluster erstellen
set_fact:
primaryAggregates: "{{ item.value.name }}"
with_items: "{{ primaryAggregateInfo | dict2items }}" -
debug:
msg: "{{ primaryAggregates }}"
fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'name'\n\nThe error appears to be in 'createSVM.yml': line 156, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - name: Aggregate Liste für den Primary Cluster erstellen\n ^ here\n"}