https://github.com/chef-boneyard/chef_slack
Development repository for the chef_slack cookbook
https://github.com/chef-boneyard/chef_slack
chef cookbooks slack
Last synced: 9 months ago
JSON representation
Development repository for the chef_slack cookbook
- Host: GitHub
- URL: https://github.com/chef-boneyard/chef_slack
- Owner: chef-boneyard
- License: apache-2.0
- Created: 2015-07-17T14:40:47.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2020-04-15T17:16:42.000Z (about 6 years ago)
- Last Synced: 2025-03-24T21:12:09.619Z (about 1 year ago)
- Topics: chef, cookbooks, slack
- Language: Ruby
- Size: 79.1 KB
- Stars: 9
- Watchers: 5
- Forks: 16
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# chef_slack Cookbook
[](https://travis-ci.org/chef-cookbooks/chef_slack) [](https://supermarket.chef.io/cookbooks/chef_slack)
This cookbook sends messages to a [Slack](http://www.slack.com) channel using the Incoming Webhook Integration
## Requirements
### Platforms
- Any platform supported by Chef
### Chef
- Chef 12.7+
### Cookbooks
- none
## slack_notify Resource Usage
In your `metadata.rb` you need to add `depends chef_slack'`. Passing the below will use default attributes
```ruby
slack_notify "Say Summat!"
```
```ruby
slack_notify "send_notification_message" do
message "This is a notification message"
webhook_url 'https://hooks.slack.com/services/XXXX/XXXXXXX/XXXXXX'
not_if { node['im_boring'] }
end
```
```ruby
slack_notify "channel_nothing" do
message "heres a message to kick off later"
username 'test_user'
channels ['foo','bar']
webhook_url 'https://hooks.slack.com/services/XXXX/XXXXXXX/XXXXXX'
icon_emoji ':tada:'
action :nothing
end
something "talk_as_test_user_to_multiple_channels" do
notifies :notify, "slack_notify[channel_nothing]", :immediately
end
```
## License & Authors
```
Author: Ian Henry
Author: Jason Rohwedder https://github.com/KennaSecurity/chef-slack
Copyright:: 2009-2015, Chef Software, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```