https://github.com/ceejbot/dirac
command-line tool for adding & removing hosts from ansible inventory
https://github.com/ceejbot/dirac
Last synced: 8 months ago
JSON representation
command-line tool for adding & removing hosts from ansible inventory
- Host: GitHub
- URL: https://github.com/ceejbot/dirac
- Owner: ceejbot
- License: isc
- Created: 2015-10-20T23:44:43.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-05-02T18:15:30.000Z (about 9 years ago)
- Last Synced: 2025-03-01T00:11:53.918Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 55.7 KB
- Stars: 4
- Watchers: 3
- Forks: 2
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @ceejbot/dirac
Add and remove hosts from ansible inventory files.
Parses existing files & preserves whitespace & comments.
[](https://www.npmjs.org/package/@ceejbot/dirac) [](http://travis-ci.org/ceejbot/dirac) [](https://coveralls.io/r/ceejbot/dirac)
## Usage
Install: `npm install -g @ceejbot/dirac`
Then run:
```
cat /path/to/inventory | dirac [--var name=val] [--group groupname] foo.example.com > output
Options:
--remove remove this host from inventory; all other options ignored [boolean]
--group, -g one or more groups to add this host to [default: "generic"]
--var, -v host vars to set; name=val format
--version show version information [boolean]
--help Show help [boolean]
```
You can specify as many `var` and `group` options as you need.
## Notes
The Dirac Communicator is James Blish's name for an ansible-like communication device.
## TODO
Handle variables better.
## LICENSE
ISC.