pushover¶
Send notifications via Pushover.
Important
See Configuration for a description of available configuration parameters.
- saltext.pushover.modules.pushover_notify.post_message(message, title=None, user=None, device=None, priority=0, expire=None, retry=None, sound=None, token=None)[source]¶
Changed in version 2.0.0: Parameters have been reordered.
deviceandsoundparameters are no longer validated to avoid unnecessary queries. Pushover defaults to all devices/the default sound in case the values are invalid.Send a message to a Pushover user or group.
CLI Example:
salt '*' pushover.post_message 'Build is done' salt '*' pushover.post_message user='uQiRzpo4DXghDmr9QzzfQu27cmVRsG' title='Hi' message='Build is done' salt '*' pushover.post_message user='uQiRzpo4DXghDmr9QzzfQu27cmVRsG' title='Hi' message='Build is done' priority='2' expire='720' retry='5'
- message
Message text to send. Required.
- title
Message title. Defaults to
Message from Salt.- user
User or group of users to send the message to. Must be a user/group ID (key), not a name or an email address. Required if not specified in the configuration.
- device
Name of the device to send the message to. Defaults to all devices of the user.
- priority
Message priority (integers between
-2and2). Defaults to0.Note
Emergency priority (
2) requiresexpireandretryparameters to be set.- expire
Stop notifying the user after the specified amount of seconds. The message is still shown after expiry.
- retry
Repeat the notification after this amount of seconds. Minimum:
30.- sound
Notification sound to play. Defaults to user default.
- token
Pushover API token. Required if not specified in the configuration.
- saltext.pushover.modules.pushover_notify.validate_user(user=None, device=None, token=None)[source]¶
Added in version 2.0.0.
Validate the resolved user and device combination.
CLI Example:
salt '*' pushover.validate_user salt '*' pushover.validate_user device=foobar salt '*' pushover.post_message user='uQiRzpo4DXghDmr9QzzfQu27cmVRsG' device=foobar
- user
User to validate. Defaults to configured user.
- device
Device of
userto validate. If unspecified, ensuresuserhas any registered device.- token
Pushover API token. Required if not specified in the configuration.
- saltext.pushover.modules.pushover_notify.validate_sound(sound, token=None)[source]¶
Added in version 2.0.0.
Validate a sound exists. Can only check official sounds.
CLI Example:
salt '*' pushover.validate_sound bike
- sound
Sound to validate.
- token
Pushover API token. Required if not specified in the configuration.