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
salt.states.slack.
post_message
(name, channel, from_name, message, api_key=None)¶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 following parameters are optional: