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

-- 
 <https://codeweavers.net>


Codeweavers latest news 
<https://codeweavers.net/company-blog>
_Codeweavers Get Focused Tech 
Conference Agenda 
<https://codeweavers.net/get-focused-2019-conference-agenda>_

*
*
*Phone:* 
0800 021 0888   Email: [email protected] 
<mailto:[email protected]>
Codeweavers Ltd | Barn 4 | Dunston 
Business Village | Dunston | ST18 9AB
Registered in England and Wales No. 
04092394 | VAT registration no. 974 9705 63 



 
<https://twitter.com/Codeweavers_Ltd>  
<https://www.facebook.com/Codeweavers.Ltd/>  
<https://www.linkedin.com/company/codeweavers-limited>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2c0615b1-81d4-43a2-8811-4114aa568309%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to