This state is useful for sending messages to Slack during state runs.
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, icon=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: