Empty facts/vars are slightly harder to deal with than missing ones, IMHO. The precedent has been set numerous times in our own setup module, as (for instance), we don’t return the facter/ohai subtrees if facter/ohai aren’t present. With the recent addition of facts subsets, we can omit entire subtrees all over the place… I’d vote for “just don’t return it” (though for non-fact module returns, I usually prefer a consistent “shape” where it makes sense)…
Thanks for the tips Matt! The setup module was a great example. I develop my playbooks with guards in place to handle when variables are not set by it, so I think I’ll go with your suggestion.