'Determine which host facts are not defined in the config.
Returns a hash of host to a list of the missing facts.'

def calc_missing_facts(self):

    result = {}
    for host in self.deployment.hosts:
        missing_facts = []
        if host.preconfigured:
            required_facts = PRECONFIGURED_REQUIRED_FACTS
        else:
            required_facts = DEFAULT_REQUIRED_FACTS
        for required_fact in required_facts:
            if (not getattr(host, required_fact)):
                missing_facts.append(required_fact)
        if (len(missing_facts) > 0):
            result[host.connect_to] = missing_facts
    return result
