This is a library cook that provides a resource to notify your favourite chatops platform.
This cookbook focuses on providing a resource to send messages to your chatops platform. See listed chat platform under 'Supports' section.
This cookbook does not install the chat platform or any other components.
- Slack
- Hipchat
Add cookbook as a dependncy in metadata.rb
depends 'chatops_notify'
:notify
- Default value for all
'channel'
The required Slack channel, default: nil'webhook'
The Slack webhook, default: nil'username'
Name message appears from in Slack, default: 'chef-client''message'
The message text to send to Slack, default: nil'icon_emoji'
The emoticon to use in Slack, default ':fork_and_knife:'
chatops_notify 'Description' do
chat_platform :slack
channel 'test'
username 'Chef'
webhook 'https://slack.webhook.url'
message 'My mesage that appears in Slack'
end
'webhook'
The Hipchat webhook, default: nil'message'
The message text to send to Hipchat, default: nil
chatops_notify 'Description' do
chat_platform :hipchat
webhook 'https://hipchat.webhook.url'
message 'My mesage that appears in Hipchat'
end
'webhook'
The custom endpoint to send message to, default: nil'body'
The payload to send to the endpoint, default: nil
chatops_notify 'Description' do
chat_platform :custom
webhook 'https://custom.webhook.url'
body 'payload expected by endpoint'
end
- Fork the repository on Github
- Create a named feature branch (like
add_chatops_client_x
) - Write your change
- Write tests for your change (if applicable)
- Run the tests, ensuring they all pass
- Submit a Pull Request using Github
Authors: Nielsen Pierce ([email protected])