I’m going to guess that you probably don’t have facts cached (or the cache has expired) for the hosts where the variable is undefined.
I’m going to guess that you probably don’t have facts cached (or the cache has expired) for the hosts where the variable is undefined.