Anons79 Mini Shell

Directory : /proc/self/root/lib/python2.7/site-packages/ansible/plugins/callback/
Upload File :
Current File : //proc/self/root/lib/python2.7/site-packages/ansible/plugins/callback/syslog_json.pyc

�
�Udac@`s�ddlmZmZmZeZdZddlZddlZddl	Z	ddl
Z	ddlZddlm
Z
de
fd��YZdS(i(tabsolute_importtdivisiontprint_functions-
    callback: syslog_json
    callback_type: notification
    requirements:
      - whitelist in configuration
    short_description: sends JSON events to syslog
    version_added: "1.9"
    description:
      - This plugin logs ansible-playbook and ansible runs to a syslog server in JSON format
      - Before 2.9 only environment variables were available for configuration
    options:
      server:
        description: syslog server that will receive the event
        env:
        - name: SYSLOG_SERVER
        default: localhost
        ini:
          - section: callback_syslog_json
            key: syslog_server
      port:
        description: port on which the syslog server is listening
        env:
          - name: SYSLOG_PORT
        default: 514
        ini:
          - section: callback_syslog_json
            key: syslog_port
      facility:
        description: syslog facility to log as
        env:
          - name: SYSLOG_FACILITY
        default: user
        ini:
          - section: callback_syslog_json
            key: syslog_facility
N(tCallbackBasetCallbackModulecB`s�eZdZdZdZdZeZd�Zd
d
d
d�Z
ed�Zd�Z
d
d�Zd	�Zd
�Zd�Zd�ZRS(sR
    logs ansible-playbook and ansible runs to a syslog server in json format
    g@t	aggregatetsyslog_jsoncC`stt|�j�dS(N(tsuperRt__init__(tself((sH/usr/lib/python2.7/site-packages/ansible/plugins/callback/syslog_json.pyRBscC`s�tt|�jd|d|d|�|jd�}t|jd��}|jd�}tjd�|_|jjtj	�tj
jd||fd|�|_|jj
|j�tj�|_dS(	Nt	task_keystvar_optionstdirecttservertporttfacilitysansible loggertaddress(RRtset_optionst
get_optiontinttloggingt	getLoggertloggertsetLeveltDEBUGthandlerst
SysLogHandlerthandlert
addHandlertsockettgethostnamethostname(R	R
RRtsyslog_hosttsyslog_porttsyslog_facility((sH/usr/lib/python2.7/site-packages/ansible/plugins/callback/syslog_json.pyRFs%cC`s)|jjd|j||j|��dS(Ns@%s ansible-command: task execution FAILED; host: %s; message: %s(RterrorRt
_dump_results(R	thosttrest
ignore_errors((sH/usr/lib/python2.7/site-packages/ansible/plugins/callback/syslog_json.pytrunner_on_failedXscC`s)|jjd|j||j|��dS(Ns<%s ansible-command: task execution OK; host: %s; message: %s(RtinfoRR$(R	R%R&((sH/usr/lib/python2.7/site-packages/ansible/plugins/callback/syslog_json.pytrunner_on_ok[scC`s |jjd|j|d�dS(NsA%s ansible-command: task execution SKIPPED; host: %s; message: %stskipped(RR)R(R	R%titem((sH/usr/lib/python2.7/site-packages/ansible/plugins/callback/syslog_json.pytrunner_on_skipped^scC`s)|jjd|j||j|��dS(NsE%s ansible-command: task execution UNREACHABLE; host: %s; message: %s(RR#RR$(R	R%R&((sH/usr/lib/python2.7/site-packages/ansible/plugins/callback/syslog_json.pytrunner_on_unreachableascC`s)|jjd|j||j|��dS(Ns@%s ansible-command: task execution FAILED; host: %s; message: %s(RR#RR$(R	R%R&tjid((sH/usr/lib/python2.7/site-packages/ansible/plugins/callback/syslog_json.pytrunner_on_async_faileddscC`s |jjd|j||�dS(NsJ%s ansible-command: playbook IMPORTED; host: %s; message: imported file %s(RR)R(R	R%t
imported_file((sH/usr/lib/python2.7/site-packages/ansible/plugins/callback/syslog_json.pytplaybook_on_import_for_hostgscC`s |jjd|j||�dS(NsM%s ansible-command: playbook NOT IMPORTED; host: %s; message: missing file %s(RR)R(R	R%tmissing_file((sH/usr/lib/python2.7/site-packages/ansible/plugins/callback/syslog_json.pytplaybook_on_not_import_for_hostjsN(t__name__t
__module__t__doc__tCALLBACK_VERSIONt
CALLBACK_TYPEt
CALLBACK_NAMEtTruetCALLBACK_NEEDS_WHITELISTRtNoneRtFalseR(R*R-R.R0R2R4(((sH/usr/lib/python2.7/site-packages/ansible/plugins/callback/syslog_json.pyR8s					(t
__future__RRRttypet
__metaclass__t
DOCUMENTATIONtostjsonRtlogging.handlersRtansible.plugins.callbackRR(((sH/usr/lib/python2.7/site-packages/ansible/plugins/callback/syslog_json.pyt<module>s%

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