diff --git a/nornir/core/task.py b/nornir/core/task.py index 979fe5de..be370981 100644 --- a/nornir/core/task.py +++ b/nornir/core/task.py @@ -300,6 +300,11 @@ def failed_hosts(self) -> Dict[str, "MultiResult"]: """Hosts that failed during the execution of the task.""" return {h: r for h, r in self.items() if r.failed} + @property + def changed(self) -> bool: + """If ``True`` at least a host changed the system.""" + return any([h.changed for h in self.values()]) + def raise_on_error(self) -> None: """ Raises: