Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/notification/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/notification/pushover.pyo

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zdd
l	m
Z
ddlmZddl
mZd
efd��YZd�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys�
---
module: pushover
version_added: "2.0"
short_description: Send notifications via U(https://pushover.net)
description:
   - Send notifications via pushover, to subscriber list of devices, and email
     addresses. Requires pushover app on devices.
notes:
   - You will require a pushover.net account to use this module. But no account
     is required to receive messages.
options:
  msg:
    description:
      - What message you wish to send.
    required: true
  app_token:
    description:
      - Pushover issued token identifying your pushover app.
    required: true
  user_key:
    description:
      - Pushover issued authentication key for your user.
    required: true
  title:
    description:
      - Message title.
    required: false
    version_added: "2.8"
  pri:
    description:
      - Message priority (see U(https://pushover.net) for details).
    required: false

author: "Jim Richardson (@weaselkeeper)"
su
- pushover:
    msg: '{{ inventory_hostname }} is acting strange ...'
    app_token: wxfdksl
    user_key: baa5fe97f2c5ab3ca8f0bb59
  delegate_to: localhost

- pushover:
    title: 'Alert!'
    msg: '{{ inventory_hostname }} has exploded in flames, It is now time to panic'
    pri: 1
    app_token: wxfdksl
    user_key: baa5fe97f2c5ab3ca8f0bb59
  delegate_to: localhost
(t
AnsibleModule(t	urlencode(t	fetch_urltPushovercB`s&eZdZdZd�Zd�ZRS(s> Instantiates a pushover object, use it to send notifications shttps://api.pushover.netcC`s||_||_||_dS(N(tmoduletuserttoken(tselfRR
R((sI/usr/lib/python2.7/site-packages/ansible/modules/notification/pushover.pyt__init__Ms		c
	C`s�d|j}td|jd|jd|d|�}|dk	rUt|d|�}nt|�}idd6}t|j|d	d
d|d|�\}}	|	d
dkr�t|	��n|j	�S(s Do, whatever it is, we do. s%s/1/messages.jsonR
Rtprioritytmessagettitles!application/x-www-form-urlencodedsContent-typetmethodtPOSTtdatatheadersRi�N(
tbase_uritdictR
RtNoneR	R
Rt	Exceptiontread(
RRtmsgRturltoptionsRRtrtinfo((sI/usr/lib/python2.7/site-packages/ansible/modules/notification/pushover.pytrunRs
			
*(t__name__t
__module__t__doc__RRR"(((sI/usr/lib/python2.7/site-packages/ansible/modules/notification/pushover.pyRIs	cC`stdtdtdd�dtdt�dtdtdt�d	tdtdt�d
tdtddd
dddddg���}t||jd	|jd�}y.|j|jd
|jd|jd�}Wn!tk
r�|jdd�nX|j	dd|dt�dS(Nt
argument_specRttypetstrRtrequiredt	app_tokentno_logtuser_keytpritdefaultt0tchoicess-2s-1t1t2sUnable to send msg via pushoversmessage sent successfully: %stchanged(
RRtTruetFalseRtparamsR"Rt	fail_jsont	exit_json(Rt
msg_objecttresponse((sI/usr/lib/python2.7/site-packages/ansible/modules/notification/pushover.pytmainks0 .
t__main__N(t
__future__RRRR't
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStansible.module_utils.basicRt+ansible.module_utils.six.moves.urllib.parseR	tansible.module_utils.urlsR
tobjectRR;R#(((sI/usr/lib/python2.7/site-packages/ansible/modules/notification/pushover.pyt<module>s


&"	

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]