README.md in knife-spork-1.5.1 vs README.md in knife-spork-1.6.0
- old
+ new
@@ -19,11 +19,13 @@
```bash
gem install knife-spork
```
-**Please note**: As of version 1.3.0, knife-spork depends on version 11.0.0 or greater of the chef gem. If you're still using Chef 10, please continue to use knife-spork 1.2.x
+knife-spork is also included in the [Chef Devlopment Kit](https://downloads.chef.io/chef-dk/).
+
+**Please note**: As of version 1.6.0, knife-spork requires Ruby 2.1.1 or greater and Chef version 11.0.0 or greater. If you're still using < Ruby 2.0 or Chef 11, please continue to use knife-spork 1.5.x
Spork Configuration
-------------------
Out of the box, knife spork will work with no configuration. However, you can optionally enable several features to enhance its functionality.
KnifeSpork will look for a configuration file in the following locations, in ascending order of precedence:
@@ -54,10 +56,12 @@
role_path: "/home/me/roles"
custom_plugin_path: "/home/me/spork-plugins"
always_promote_remote: true
skip_berkshelf: false
role_match_file_name: true
+role_safe_delete: true
+stdout_diffs
json_options:
indent: " "
plugins:
campfire:
account: myaccount
@@ -100,13 +104,12 @@
host: influx.example.com
port: 8086
eventinator:
url: http://eventinator.mydomain.com/events/oneshot
slack:
- api_token: abc123
+ webhook_url: https://hooks.slack.com/services/ABCD/efgh
channel: "#sysops"
- teamname: myteam
username: knife
icon_url: http://example.com/image.jpg
rubocop:
epic_fail: true
show_name: false
@@ -145,13 +148,20 @@
#### Role Path
The `role_path` allows you to specify the path to where you store your chef role json files. If this parameter is not specified, spork will default to using the first element of your cookbook_path, replacing the word "cookbooks" with "roles"
+#### Role Safe Delete
+The `role_safe_delete` flag will, when you use the spork ```knife spork role delete``` command, check to see if any nodes currently have that role in their runlist and exit with an error message if any are found.
+
#### Role Match File Name
The `role_match_file_name` flag allows you to check whether the file name that is used to upload a role matches the role name as well. If the parameter is specified, or flag `--match-filename` is set, spork will not let you upload a role from a file unless the name matches the rolename.
+#### Stdout Diffs
+The `stdout_diffs` flag will cause any diffs generated by knife-spork (for example on events such as data bag uploads, role edits etc) to be displayed on stdout in addition to any notifications generated by plugins.
+
+
#### Custom Plugin Path
The `custom_plugin_path` allows you to specify an additional directory from which to load knife-spork plugins. If this parameter is not specified or the path set does not exist, only the default plugins shipped with knife-spork will be loaded (if enabled in config)
#### Plugins
@@ -500,5 +510,15 @@
knife spork environment create
knife spork environment delete
knife spork environment edit
knife spork environment from file
```
+
+Troubleshooting
+---------------
+If you get an error when running `knife spork <command>` and the message shown when running with the `-VV` flag contains:
+```ruby
+undefined method `gsub' for #<Pathname:0x00000002d3a6b0> (NoMethodError)
+```
+...then you are probably using `Librarian::Chef.install_path()` in your `knife.rb` file.
+
+To fix this you need to call `.to_s` on the install path, i.e. ``Librarian::Chef.install_path().to_s`.