Module for sending messages to Mattermost
New in version 2017.7.0.
This module can be used by either passing an api_url and hook directly or by specifying both in a configuration profile in the salt master/minion config. For example:
mattermost:
hook: peWcBiMOS9HrZG15peWcBiMOS9HrZG15
api_url: https://example.com
salt.modules.mattermost.
post_message
(message, channel=None, username=None, api_url=None, hook=None)¶Send a message to a Mattermost channel.
channel -- The channel name, either will work.
username -- The username of the poster.
message -- The message to send to the Mattermost channel.
api_url -- The Mattermost api url, if not specified in the configuration.
hook -- The Mattermost hook, if not specified in the configuration.
Boolean if message was sent successfully.
CLI Example:
salt '*' mattermost.post_message message='Build is done'
Generated on August 05, 2021 at 04:04:00 UTC.
You are viewing docs for the previous stable release, 3000.9. Switch to docs for the latest stable release, 3003.1, or to a recent doc build from the master branch.
© 2021 SaltStack. All Rights Reserved, SaltStack Inc. | Privacy Policy