开发者社区> 镜像站> NPM> run-on-host
run-on-host
Runs a given command on a specific ansible host.
Last updated 3 years ago by thlorenz .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install run-on-host 
SYNC missed versions from official npm registry.

run-on-host build status

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
    • $0.ansibleRoot String? the root directory, i.e. where the ansible.cfg file lives (optional, default cwd)
    • $0.pipe Boolean? if true pipes command output to stdout/stderr (optional, default true)

Returns Promise that resolves once command completed or rejects if something goes wrong

License

MIT

Current Tags

  • 0.1.0                                ...           latest (3 years ago)

1 Versions

  • 0.1.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (2)
Dev Dependencies (1)
Dependents (0)
None