I’m getting an error when using “when” and “with_items” together. As I’ve read many times, this happens because “when” runs inside “with_items”, so we can use “| default()” to bypass the error, but I think I found a new twist on it. Here’s an example:
default only applies to the 'last' item, so if you are going to do
several depths of var defintion that can be undefined, you should have
several defaults.