runOnHost

Attempts to run the given command on the supplied ansible host via ssh. Determines user, hostname and port from the ansible-inventory.

runOnHost(cmd: String, host: String, $0: Object, $2: Object): Promise
Parameters
cmd (String) command to fun, i.e. ls -la /var/log
host (String) the ansible host to run the command on
$0 (Object) options
Name Description
$0.ansibleRoot String? (default cwd) the root directory, i.e. where the ansible.cfg file lives
$0.pipe Boolean? (default true) if true pipes command output to stdout/stderr
$2 (Object)
Name Description
$2.ansibleRoot any
$2.pipe any (default true)
Returns
Promise: that resolves once command completed or rejects if something goes wrong