nornir.core.state
- class nornir.core.state.GlobalState(dry_run: bool = False, failed_hosts: set[str] | None = None)
Placeholder to share data amongst different versions of Nornir.
The same object is shared amongst all the versions of Nornir that result from running
filtermultiple times.- failed_hosts
Hosts that have failed to run a task properly
- dict() dict[str, Any]
Return a dictionary representing the object.
- Returns:
The value of each attribute in
__slots__keyed by its name.
- dry_run
- failed_hosts
- recover_host(host: str) None
Remove
hostfrom list of failed hosts.
- reset_failed_hosts() None
Reset failed hosts and make all hosts available for future tasks.