pyinfra.api.host module

class pyinfra.api.host.Host(name, inventory, groups, data, executor=<module 'pyinfra.api.connectors.ssh' from '/home/docs/checkouts/readthedocs.org/user_builds/pyinfra/envs/latest/lib/python3.7/site-packages/pyinfra/api/connectors/ssh.py'>)

Bases: object

Represents a target host. Thin class that links up to facts and host/group data.

connect(state, for_fact=None, show_errors=True)
connection = None
disconnect(state)
get_file(state, *args, **kwargs)
property group_data
property host_data
property print_prefix
put_file(state, *args, **kwargs)
run_shell_command(state, *args, **kwargs)
style_print_prefix(*args, **kwargs)
class pyinfra.api.host.HostFacts(inventory, host)

Bases: object