Created
February 26, 2016 21:52
-
-
Save sbrinkmeyer/e3a4ebc070314200226a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Catch cookbook changes not made by the 'pipeline' user | |
rules 'catch cookbook changes' | |
with priority=50 | |
rule on action | |
when | |
parent_type = 'cookbook' | |
and | |
requestor_name != 'go-agent' | |
then | |
// Not passing a second parameter(notification string) | |
// in order to send the default json CONTENT | |
notify('infracoe-email', "{{message.cookbook_name}}") | |
notify( 'mattermost_infracoe', '{ | |
"username": "Chef Analytics Notifications", | |
"attachments": [ {"text": "`{{message.requestor_name}}` uploaded cookbook `{{message.cookbook_name}}` on machine `{{message.remote_hostname}}` to organization `{{message.organization_name}}`", | |
"color": "danger" | |
}] | |
}') | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment