diff --git a/pyinfra/api/facts.py b/pyinfra/api/facts.py
index <HASH>..<HASH> 100644
--- a/pyinfra/api/facts.py
+++ b/pyinfra/api/facts.py
@@ -173,7 +173,7 @@ def get_facts(state, name, args=None, ensure_hosts=None, apply_failed_hosts=True
     with FACT_LOCK:
         # Add any hosts we must have, whether considered in the inventory or not
         # (these hosts might be outside the --limit or current op limit_hosts).
-        hosts = set(state.inventory)
+        hosts = set(state.inventory.iter_active_hosts())
         if ensure_hosts:
             hosts.update(ensure_hosts)
Only consider active hosts when collecting facts.