clap.executor

Module Contents

Classes

AnsiblePlaybookExecutor

Executor

SSHCommandExecutor

ShellInvoker

Attributes

logger

class clap.executor.AnsiblePlaybookExecutor(playbook_file, private_path, inventory=None, extra_args=None, env_vars=None, quiet=False, verbosity=0)

Bases: Executor

class PlaybookResult
events :Dict[str, List[dict]]
hosts :Dict[str, bool]
ok :bool
ret_code :int
vars :Dict[str, Dict[str, Any]]
static create_extra_vars(output_dir, nodes, private_path)
Parameters
Return type

dict

static create_inventory(hosts_node_map, private_path, host_vars=None, node_vars=None)
Parameters
Return type

dict

run(self)
Return type

PlaybookResult

class clap.executor.Executor
abstract run(self)
Return type

Any

class clap.executor.SSHCommandExecutor(command, nodes, private_path, max_workers=0, connection_timeout=10.0, execution_timeout=None, environment=None)

Bases: Executor

class CommandResult
error :Optional[str]
ok :bool
ret_code :Optional[int]
stderr_lines :Optional[List[str]]
stdout_lines :Optional[List[str]]
connect_and_execute(self, node)
Parameters

node (clap.node.NodeDescriptor) –

Return type

CommandResult

run(self)
Return type

Dict[str, CommandResult]

class clap.executor.ShellInvoker(node, private_path, verbosity=0, ssh_binary='ssh')

Bases: Executor

run(self)
clap.executor.logger