pyinfra.local module

pyinfra.local.include(filename: str)

Executes a local python file within the pyinfra.state.cwd directory.

pyinfra.local.shell(commands, splitlines: bool = False, ignore_errors: bool = False, print_output: bool = False, print_input: bool = False)

Subprocess based implementation of pyinfra/api/ssh.py’s run_shell_command.

Parameters
  • commands (string, list) – command or list of commands to execute
  • splitlines (bool) – optionally have the output split by lines
  • ignore_errors (bool) – ignore errors when executing these commands