#Anyone got a good way using Rest of
1 messages · Page 1 of 1 (latest)
You have free space in the facts.
Then you can build a list with that and sort it in the ansible code.
Got an example? I've only gathered facts with rest_info
You register the output of your gather_facts and loop over your register to build a list with the key=values you need.
Alternativ you loop and pick your aggregat right away if you dont need a list.
You could try the following. I don't know if that = most free space. But it is an option
netapp.ontap.na_ontap_rest_info: hostname: "1.2.3.4" username: "testuser" password: "test-password" https: true fields: - 'uuid' - 'name' - 'node' validate_certs: false use_rest: Always gather_subset: - storage/aggregates parameters: recommend: true
Recommend = If set to 'true', it queries the system for the recommended optimal layout for creating new aggregates. The default setting is 'false'.
This question wasn't about creating aggregates, but thank you for your input. 😃