Architecture

Host

class nuka.hosts.base.BaseHost(hostname=None, port='22', **vars)[source]
boot()[source]

boot the host

destroy()[source]

destroy the host

get_inventory()[source]

return host’s inventory. await for host’s boot & setup if needed

private_ip

return host’s private ip

public_ip

return host’s public ip

run_command(cmd=None, stdin=None, task=None, **kwargs)[source]

run a shell command on the remote host

Task

class nuka.task.Task(**kwargs)[source]
run()[source]

Serialize the task, send it to the remote host. The remote script will deserialize the task and run do() (or diff() when using –diff)

Remote task

class nuka.remote.task.Task(**kwargs)[source]

Remote task

do()[source]

called on the remote host. Task arguments are available in self.args Must return a dict like:

{'rc': 0, 'changed': False}
classmethod is_alive(process)[source]

return True iif the process is the current process

classmethod send_log(message, level=10)[source]

send a log line to the client

classmethod send_progress(value, level=32)[source]

send progression of the current remote process to the client

classmethod sh(args, stdin=b'', shell=False, env=None, check=True, watcher=None, short_args=None, stdout=None, stderr=None)[source]

run a shell command