salt.modules.pushover_notify

Module for sending messages to Pushover (https://www.pushover.net)

2016.3.0 新版功能.

configuration:

This module can be used by either passing an api key and version directly or by specifying both in a configuration profile in the salt master/minion config.

For example:

pushover:
  token: abAHuZyCLtdH8P4zhmFZmgUHUsv1ei8
salt.modules.pushover_notify.post_message(user=None, device=None, message=None, title=None, priority=None, expire=None, retry=None, sound=None, api_version=1, token=None)

Send a message to a Pushover user or group.

参数:
  • user -- The user or group to send to, must be key of user or group not email address.
  • message -- The message to send to the PushOver user or group.
  • title -- Specify who the message is from.
  • priority -- The priority of the message, defaults to 0.
  • expire -- The message should expire after N number of seconds.
  • retry -- The number of times the message should be retried.
  • sound -- The sound to associate with the message.
  • api_version -- The PushOver API version, if not specified in the configuration.
  • token -- The PushOver token, if not specified in the configuration.
返回:

Boolean if message was sent successfully.

CLI Example:

salt '*' pushover.post_message user='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' title='Message from Salt' message='Build is done'

salt '*' pushover.post_message user='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' title='Message from Salt' message='Build is done' priority='2' expire='720' retry='5'