HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/states/__pycache__/pushover.cpython-310.pyc
o

�N�gh�@s.dZdd�Z										ddd�ZdS)a�
Send a message to PushOver
==========================

This state is useful for sending messages to PushOver during state runs.

.. versionadded:: 2015.5.0

.. code-block:: yaml

    pushover-message:
      pushover.post_message:
        - user: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        - token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        - title: Salt Returner
        - device: phone
        - priority: -1
        - expire: 3600
        - retry: 5
        - message: 'This state was executed successfully.'

The api key can be specified in the master or minion configuration like below:
.. code-block:: yaml

    pushover:
      token: peWcBiMOS9HrZG15peWcBiMOS9HrZG15

cCsdtvrdSdS)zC
    Only load if the pushover module is available in __salt__
    �pushover.post_messageZpushover)Fz#pushover module could not be loaded)�__salt__�rr�H/opt/saltstack/salt/lib/python3.10/site-packages/salt/states/pushover.py�__virtual__srN�c

Cs�|iddd�}tdrd�|�|d<d|d<|S|s#d	|��|d<|S|s.d
|��|d<|Std||||||||
d�}|rKd
|d<d|��|d<|Sd|��|d<|S)a�
    Send a message to a PushOver channel.

    .. code-block:: yaml

        pushover-message:
          pushover.post_message:
            - user: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
            - token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
            - title: Salt Returner
            - device: phone
            - priority: -1
            - expire: 3600
            - retry: 5

    The following parameters are required:

    name
        The unique name for this event.

    user
        The user or group of users to send the message to. Must be ID of user, not name
        or email address.

    message
        The message that is to be sent to the PushOver channel.

    The following parameters are optional:

    title
        The title to use for the message.

    device
        The device for the user to send the message to.

    priority
        The priority for the message.

    expire
        The message should expire after specified amount of seconds.

    retry
        The message should be resent this many times.

    token
        The token for PushOver to use for authentication,
        if not specified in the configuration options of master or minion.

    F�)�nameZchanges�result�comment�testz3The following message is to be sent to PushOver: {}r
Nr	zPushOver user is missing: zPushOver message is missing: r)�user�message�title�device�priority�expire�retry�tokenTzSent message: zFailed to send message: )Z__opts__�formatr)
rrrr
rrrrZsound�api_versionr�retr	rrr�post_message(s:>���r)
NNNNNNNNrN)�__doc__rrrrrr�<module>s�