'Sets or updates the given facts for a host in the fact cache.'

def set_nonpersistent_facts(self, host, facts):

    assert isinstance(facts, dict), ("the    type    of    'facts'    to    set    for    nonpersistent_facts    should    be    a    dict    but    is    a    %s" % type(facts))
    if (host.name not in self._nonpersistent_fact_cache):
        self._nonpersistent_fact_cache[host.name] = facts
    else:
        try:
            self._nonpersistent_fact_cache[host.name].update(facts)
        except KeyError:
            self._nonpersistent_fact_cache[host.name] = facts
