Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jedi4ever/chef-command.js
Generates the correct opscode chef command, dna.json and config.rb
https://github.com/jedi4ever/chef-command.js
Last synced: about 1 month ago
JSON representation
Generates the correct opscode chef command, dna.json and config.rb
- Host: GitHub
- URL: https://github.com/jedi4ever/chef-command.js
- Owner: jedi4ever
- License: mit
- Created: 2013-08-14T14:23:47.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-08-14T15:02:08.000Z (over 11 years ago)
- Last Synced: 2024-10-08T00:42:04.006Z (3 months ago)
- Language: JavaScript
- Size: 156 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: License
Awesome Lists containing this project
README
# Description
This generates both the correct [Opscode chef](http://opscode.com/chef) command the corresponding json file to use.
Documentation on Chef-Solo options:
-
-
-Documentation on Chef-Client options:
-
-# API
## Constructorvar ChefCommand = require('chef-command');
var chefCmd = new ChefCommand();options:
- `executable`: defaults to chef-solo
- `file_cache_path`:
- `dna_json_path`:
- `role_path`:
- `environment_path`:
- `data_bag_path`:
- `config_rb_path`:
- `log_level`:
- `cookbook_path`:
- `run_list`:
- `extra_json`: // extra json to merge in the dna.json## Instance variables
- settings : a hash containing all settings
## Instance methods
var ChefCommand = require('chef-command');
var chefCmd = new ChefCommand();
chefCmd.addCookbookPath('/tmp/cookbooks'); // add a cookbook
chefCmd.addCookbookPath('/tmp/site-cookbooks').logLevel('debug'); // example of chainable- `addCookbookPath(path)` : adds a CookbookPath + returns chainable self
- `removeCookbookPath(path)` : removes a CookbookPath + returns chainable self
- `addRolePath(path)` : adds a RolePath + returns chainable self
- `removeRolePath(path)` : removes a RolePath + returns chainable self
- `addDataBagPath(path)` : adds a DataBagPath + returns chainable self
- `removeDataBagPath(path)` : removes a DataBagPath + returns chainable self
- `setExecutable(command)` : sets the executable command to command
- `setLogLevel(level)` : sets the LogLevel + returns chainable self
- `addRecipe(recipe)` : adds recipe to the runlist
- `addRole(role)` : adds role to the run runlist
- `setRunList(array of runlist)` : sets the runlist
- `setExtraJson(json)` : json to merge with dna.json
- `removeRole(role)`: removes the role from the runlist
- `removeRecipe(recipe)`: removes the recipe to the runlist## Getters
var ChefCommand = require('chef-command');
var chefCmd = new ChefCommand();
chefCmd.addCookbookPath('/tmp/cookbooks'); // add a cookbook
chefCmd.generate();- generate() : return hash containing
- `dna_json`: **string** containing the dna.json to use
- `config_rb`: **string** containing the config.rb
- `command`: **string** containing the actual CLI invocation