Is there anything like the “default(omit)” filter available for ordinary variable declarations?
I am building a list of volume details, which will be passed too the ec2 module. With module parameters, one can comvert an undefined parameter inot no parameter at all with the “default(omit)” filter, but I cn’t find a way to simply leave out an undefined item from the list I m building.
Say my input is a list of tables like this:
alist:
{ ‘fred’: value1, ‘mary’: value2 }
{ 'fred: value3 }
I want to process that list into another list using set_fact, so:
Is there anything like the "default(omit)" filter available for ordinary
variable declarations?
I am building a list of volume details, which will be passed too the ec2
module. With module parameters, one can comvert an undefined parameter inot
no parameter at all with the "default(omit)" filter, but I cn't find a way
to simply leave out an undefined item from the list I m building.
I am a bit annoyed with myself, because I have used exactly that technique to avoid a missing list. I don’t know why it never occurred to me to avoid a missing map the same way