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/log_plays.pyc

�
�Udac@`s�ddlmZmZmZeZdZddlZddlZddl	Z	ddl
mZddlm
Z
ddlmZddlmZddlmZd	efd
��YZdS(i(tabsolute_importtdivisiontprint_functions�
    callback: log_plays
    type: notification
    short_description: write playbook output to log file
    version_added: historical
    description:
      - This callback writes playbook output to a file per host in the `/var/log/ansible/hosts` directory
    requirements:
     - Whitelist in configuration
     - A writeable /var/log/ansible/hosts directory by the user executing Ansible on the controller
    options:
      log_folder:
        version_added: '2.9'
        default: /var/log/ansible/hosts
        description: The folder where log files will be created.
        env:
          - name: ANSIBLE_LOG_FOLDER
        ini:
          - section: callback_log_plays
            key: log_folder
N(t
makedirs_safe(tto_bytes(tMutableMapping(tAnsibleJSONEncoder(tCallbackBasetCallbackModulecB`s�eZdZdZdZdZeZdZdZ	d�Z
dddd�Zd�Z
ed	�Zd
�Zdd�Zd�Zd
�Zd�Zd�ZRS(sD
    logs playbook results, per host, in /var/log/ansible/hosts
    g@tnotificationt	log_playss%b %d %Y %H:%M:%Ss#%(now)s - %(category)s - %(data)s

cC`stt|�j�dS(N(tsuperRt__init__(tself((sF/usr/lib/python2.7/site-packages/ansible/plugins/callback/log_plays.pyR<scC`s`tt|�jd|d|d|�|jd�|_tjj|j�s\t|j�ndS(Nt	task_keystvar_optionstdirectt
log_folder(	RRtset_optionst
get_optionRtostpathtexistsR(R
RRR((sF/usr/lib/python2.7/site-packages/ansible/plugins/callback/log_plays.pyR@s%c		C`st|t�r�d|kr$d}q�|j�}|jdd�}tj|dt�}|dk	r�tj|�d|}q�ntj	j
|j|�}tj
|jtj��}t|jtd|d|d|��}t|d	��}|j|�WdQXdS(
Nt_ansible_verbose_overridetomittedt
invocationtclss => %s tnowtcategorytdatatab(t
isinstanceRtcopytpoptNonetjsontdumpsRRRtjoinRttimetstrftimetTIME_FORMATt	localtimeRt
MSG_FORMATtdicttopentwrite(	R
thostRRRRRtmsgtfd((sF/usr/lib/python2.7/site-packages/ansible/plugins/callback/log_plays.pytlogHs	(cC`s|j|d|�dS(NtFAILED(R1(R
R.trest
ignore_errors((sF/usr/lib/python2.7/site-packages/ansible/plugins/callback/log_plays.pytrunner_on_failed[scC`s|j|d|�dS(NtOK(R1(R
R.R3((sF/usr/lib/python2.7/site-packages/ansible/plugins/callback/log_plays.pytrunner_on_ok^scC`s|j|dd�dS(NtSKIPPEDs...(R1(R
R.titem((sF/usr/lib/python2.7/site-packages/ansible/plugins/callback/log_plays.pytrunner_on_skippedascC`s|j|d|�dS(NtUNREACHABLE(R1(R
R.R3((sF/usr/lib/python2.7/site-packages/ansible/plugins/callback/log_plays.pytrunner_on_unreachabledscC`s|j|d|�dS(NtASYNC_FAILED(R1(R
R.R3tjid((sF/usr/lib/python2.7/site-packages/ansible/plugins/callback/log_plays.pytrunner_on_async_failedgscC`s|j|d|�dS(NtIMPORTED(R1(R
R.t
imported_file((sF/usr/lib/python2.7/site-packages/ansible/plugins/callback/log_plays.pytplaybook_on_import_for_hostjscC`s|j|d|�dS(NtNOTIMPORTED(R1(R
R.tmissing_file((sF/usr/lib/python2.7/site-packages/ansible/plugins/callback/log_plays.pytplaybook_on_not_import_for_hostmsN(t__name__t
__module__t__doc__tCALLBACK_VERSIONt
CALLBACK_TYPEt
CALLBACK_NAMEtTruetCALLBACK_NEEDS_WHITELISTR(R*RR"RR1tFalseR5R7R:R<R?RBRE(((sF/usr/lib/python2.7/site-packages/ansible/plugins/callback/log_plays.pyR0s"						(t
__future__RRRttypet
__metaclass__t
DOCUMENTATIONRR&R#tansible.utils.pathRtansible.module_utils._textRt/ansible.module_utils.common._collections_compatRtansible.parsing.ajsonRtansible.plugins.callbackRR(((sF/usr/lib/python2.7/site-packages/ansible/plugins/callback/log_plays.pyt<module>s

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