This state is useful for sending messages to Slack during state runs.
New in version 2015.5.0.
slack-message:
slack.post_message:
- channel: '#general'
- from_name: SuperAdmin
- message: 'This state was executed successfully.'
- api_key: peWcBiMOS9HrZG15peWcBiMOS9HrZG15
The api key can be specified in the master or minion configuration like below:
slack:
api_key: peWcBiMOS9HrZG15peWcBiMOS9HrZG15
Send a message to a Slack channel.
slack-message:
slack.post_message:
- channel: '#general'
- from_name: SuperAdmin
- message: 'This state was executed successfully.'
- api_key: peWcBiMOS9HrZG15peWcBiMOS9HrZG15
The following parameters are required:
The unique name for this event.
The channel to send the message to. Can either be the ID or the name.
The name of that is to be shown in the "from" field.
The message that is to be sent to the Slack channel.
The following parameters are optional:
The api key for Slack to use for authentication, if not specified in the configuration options of master or minion.
URL to an image to use as the icon for this message
The unique name for this event.
The message that is to be sent to the Slack channel.
The color of border of left side
An optional flag indicating whether the value is short enough to be displayed side-by-side with other values.
The identifier of WebHook (URL or token).
The channel to use instead of the WebHook default.
Username to use instead of WebHook default.
Icon to use instead of WebHook default.