0.1.0 • Published 6 years ago
run-on-host v0.1.0
run-on-host
Runs a given command on a specific ansible host.
Usage:
run-on-host <host> <command>
# OR verbose with more options
run-on-host --host=<host> [--root=<ansible root>] <command>
Example:
run-on-host vagrant ls -la /var/log
run-on-host --host=vagrant ls -la /var/log
Installation
npm install run-on-host
API
runOnHost
Attempts to run the given command on the supplied ansible host via ssh
.
Determines user, hostname and port from the ansible-inventory.
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
Returns Promise that resolves once command completed or rejects if something goes wrong
License
MIT
0.1.0
6 years ago