https://github.com/tkuchiki/chef-dump-attr
Dump attributes command for Chef
https://github.com/tkuchiki/chef-dump-attr
attributes chef cli dumper ruby
Last synced: 2 months ago
JSON representation
Dump attributes command for Chef
- Host: GitHub
- URL: https://github.com/tkuchiki/chef-dump-attr
- Owner: tkuchiki
- License: mit
- Created: 2016-03-04T03:58:44.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-03-07T07:51:27.000Z (about 9 years ago)
- Last Synced: 2025-01-25T09:11:09.978Z (4 months ago)
- Topics: attributes, chef, cli, dumper, ruby
- Language: Ruby
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# chef-dump-attr
Dump attributes command for Chef## Requirements
- `chef`
- `ohai`## Usage
```
Usage: chef-dump-attr [options]
-j JSON_ATTRIBS, Load attributes from a JSON file
--json-attributes
-c, --config FILE_PATH The configuration file to use
-r, --role-path ROLE_PATH Role path
--cookbook-path COOKPATH_PATH
Cookpath path
-d DATA_BAG_PATH, Data bags path
--data-bag-path
-o, --output OUTPUT Output type (json, ruby)
--include-ohai Include ohai
--ohai Output ohai
--ohai-plugin-dir A directory to add to the Ohai search path
--data-bag-name Data bag name
--data-bag-item Data bag item
--no-pretty Not puretty output
-v, --version Show version
```## Example
### Attributes
```
$ ./chef-dump-attr -c client.rb -j node.json
```### Ohai
```
$ ./chef-dump-attr -c client.rb -j node.json --ohai
```### Attributes & Ohai
```
$ ./chef-dump-attr -c client.rb -j node.json --include-ohai
```### Output json
```
$ ./chef-dump-attr -c client.rb -j node.json [--output json]
```### Output hash
```
$ ./chef-dump-attr -c client.rb -j node.json [--output ruby]
```### Not puretty output
```
$ ./chef-dump-attr -c client.rb -j node.json --no-pretty
```## TODO
- Support Data bags