Anons79 Mini Shell

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

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddlZd
�Z
d�Zd�Zd�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys
---
module: syslogger

short_description: Log messages in the syslog

version_added: "2.4"

description:
    - "Uses syslog to add log entries to the host."
    - "Can specify facility and priority."

options:
    msg:
        description:
            - This is the message to place in syslog
        required: true
    priority:
        description:
            - Set the log priority
        choices: [ "emerg", "alert", "crit", "err", "warning", "notice", "info", "debug" ]
        required: false
        default: "info"
    facility:
        description:
            - Set the log facility
        choices: [ "kern", "user", "mail", "daemon", "auth", "lpr", "news",
                   "uucp", "cron", "syslog", "local0", "local1", "local2",
                   "local3", "local4", "local5", "local6", "local7" ]
        required: false
        default: "daemon"
    log_pid:
        description:
            - Log the pid in brackets
        type: bool
        required: false
        default: "no"

author:
    - Tim Rightnour (@garbled1)
s�
# Full example
- name: Test syslog
  syslogger:
    msg: "Hello from ansible"
    priority: "err"
    facility: "daemon"
    log_pid: true

# Basic usage
- name: Simple Usage
  syslogger:
    msg: "I will end up as daemon.info"

t
(t
AnsibleModuleNcC`s�itjd6tjd6tjd6tjd6tjd6tjd6tjd6tjd6tj	d	6tj
d
6tjd6tjd6tj
d
6tjd6tjd6tjd6tjd6tjd6j|tj�S(Ntkerntusertmailtdaemontauthtlprtnewstuucptcrontsyslogtlocal0tlocal1tlocal2tlocal3tlocal4tlocal5tlocal6tlocal7(RtLOG_KERNtLOG_USERtLOG_MAILt
LOG_DAEMONtLOG_AUTHtLOG_LPRtLOG_NEWStLOG_UUCPtLOG_CRONt
LOG_SYSLOGt
LOG_LOCAL0t
LOG_LOCAL1t
LOG_LOCAL2t
LOG_LOCAL3t
LOG_LOCAL4t
LOG_LOCAL5t
LOG_LOCAL6t
LOG_LOCAL7tget(tx((sJ/usr/lib/python2.7/site-packages/ansible/modules/notification/syslogger.pytget_facilityMs(

















cC`scitjd6tjd6tjd6tjd6tjd6tjd6tjd6tjd6j	|tj�S(	Ntemergtalerttcritterrtwarningtnoticetinfotdebug(
Rt	LOG_EMERGt	LOG_ALERTtLOG_CRITtLOG_ERRtLOG_WARNINGt
LOG_NOTICEtLOG_INFOt	LOG_DEBUGR.(R/((sJ/usr/lib/python2.7/site-packages/ansible/modules/notification/syslogger.pytget_priorityds







cC`s�tdtdddt�dtdddtdddd	d
ddd
dgdd
�dtdddtddddddddddddddddd d!d"gdd�d#tdd$dtdt��}td%|�}td&td|jdd|jdd#|jd#d|jd�}y�|jd#rWtjd'd(tjdt|jd��n tjd'dt|jd��tjt	|jd�|jd�tj
�t|d&<Wn$tk
r�|jd)d*|�nX|j
|�dS(+NtmsgttypetstrtrequiredtprioritytchoicesR1R2R3R4R5R6R7R8tdefaulttfacilityR
RRR
RRRRRRRRRRRRRRtlog_pidtboolt
argument_spectchangedtansible_sysloggert	logoptionterrorsFailed to write to syslog(tdicttTruetFalseR	tparamsRtopenlogtLOG_PIDR0RAtcloselogt	Exceptiont	fail_jsont	exit_json(tmodule_argstmoduletresult((sJ/usr/lib/python2.7/site-packages/ansible/modules/notification/syslogger.pyt
run_moduleqsF			



	

cC`st�dS(N(R^(((sJ/usr/lib/python2.7/site-packages/ansible/modules/notification/syslogger.pytmain�st__main__(t
__future__RRRRCt
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicR	RR0RAR^R_t__name__(((sJ/usr/lib/python2.7/site-packages/ansible/modules/notification/syslogger.pyt<module>s


*		
	2	

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