pyinfra.api.state

class pyinfra.api.state.State(inventory, config=None)

Bases: object

Manages state for a pyinfra deploy.

active = True
config = None
current_op_meta = None
deploy_dir = None
fail_hosts(hosts_to_fail)

Flag a set of hosts as failed, error for config.FAIL_PERCENT.

get_temp_filename(hash_key=None)

Generate a temporary filename for this deploy.

in_op = False
inventory = None
limit_hosts = None
pipelining = False
pool = None
print_fact_info = False
print_fact_output = False
print_lines = False
print_output = False
ready_host(host)

Flag a host as ready, after which facts will not be gathered for it.