Hello,
I have writte the following to check that each partition on a device of a certain type has a uuid (N.B. extended partitions used in logical partitioning scheme do not):
- set_fact:
partitions: "{{ partitions|default([]) + [ item.value.partitions ] }}"
with_dict: "{{ ansible_devices }}"
when: item.key is regex("^sd[a-z]")
- assert:
that: item.value.uuid is not none
with_dict: "{{ partitions }}"
Is it possibe to combine these two tasks into one task? It looks like it should be possible using with_subelements but that looks like it is designed to work with lists of dictionaries rather than nested dictionaries. I've also tried and failed with with_nested.
Thanks
STD