I think I understand what's happening; the $packet_changed "variable" isn't
getting "auto-created" because the action isn't being executed due to the
only_if
So I tried the following workaround:
In group_/vars/all, I defined package_changed with the proper default
"skeleton" :
package_changed: {"changed": false, "item": "", "msg": "", "rc": 0,
"results": [""]}This seems to work : )
Am I missing something? Alternatively, can anyone point me to a better
solution/workaround?
I think you've got it exactly.
I think this is a (somewhat minor) bug we need to file. When
skipping a conditional statement, store "None" in the value of the
variable being registered, and is_set($foo) of a variable that is None
should return False.
Please file a github on this one and we can take care of it.