mattermost

Module for sending messages to Mattermost

Important

You can optionally add a configuration profile to avoid having to pass hook and api_url to each invocation.

saltext.mattermost.modules.mattermost.post_message(message, channel=None, username=None, api_url=None, hook=None)[source]

Send a message to a Mattermost channel.

Parameters:
  • 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.

Returns:

Boolean if message was sent successfully.

CLI Example:

salt '*' mattermost.post_message message='Build is done'