clap.executor
¶
Module Contents¶
Classes¶
Attributes¶
- 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
output_dir (str) –
nodes (List[clap.node.NodeDescriptor]) –
private_path (str) –
- Return type
dict
- static create_inventory(hosts_node_map, private_path, host_vars=None, node_vars=None)¶
- Parameters
hosts_node_map (Union[List[clap.node.NodeDescriptor], Dict[str, List[clap.node.NodeDescriptor]]]) –
private_path (str) –
host_vars (Dict[str, Dict[str, str]]) –
node_vars (Dict[str, Dict[str, str]]) –
- Return type
dict
- run(self)¶
- Return type
- 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
- 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¶