Simple Task

This example shows how to use the komando function to execute a simple command task on a remote server.

local host = {
    address = "10.20.30.41",
    user = "user1",
    private_key_file = "/path/to/private/key",
}

local task = {
    name = "Create a new directory",
    komandan.modules.cmd({
        cmd = "mkdir /tmp/new_dir"
    })
}

komandan.komando(host, task)