Server IP : 85.193.89.191 / Your IP : 3.137.185.59 Web Server : Apache System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64 User : bitrix ( 600) PHP Version : 8.1.27 Disable Function : NONE MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/python2.7/site-packages/ansible/plugins/callback/ |
Upload File : |
� � �\c @` s� d d l m Z m Z m Z e Z d Z d d l Z d d l Z d d l Z d d l m Z d d l m Z d d l m Z d d l m Z d e f d � � YZ d S( i ( t absolute_importt divisiont print_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 - "TODO: make this configurable" requirements: - Whitelist in configuration - A writeable /var/log/ansible/hosts directory by the user executing Ansible on the controller N( t MutableMapping( t to_bytes( t AnsibleJSONEncoder( t CallbackBaset CallbackModulec B` s� e Z d Z d Z d Z d Z e Z d Z d Z d � Z d � Z e d � Z d � Z d d � Z d � Z d � Z d � Z d � Z RS( 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 c C` s9 t t | � j � t j j d � s5 t j d � n d S( Ns /var/log/ansible/hosts( t superR t __init__t ost patht existst makedirs( t self( ( sF /usr/lib/python2.7/site-packages/ansible/plugins/callback/log_plays.pyR 2 s c C` s t | t � r� d | k r$ d } q� | j � } | j d d � } t j | d t �} | d k r� t j | � d | } q� n t j j d | � } t j | j t j � � } t | j t d | d | d | � � } t | d � � } | j | � Wd QXd S( Nt _ansible_verbose_overridet omittedt invocationt clss => %s s /var/log/ansible/hostst nowt categoryt datat ab( t isinstanceR t copyt popt Nonet jsont dumpsR R R t joint timet strftimet TIME_FORMATt localtimeR t MSG_FORMATt dictt opent write( R t hostR R R R R t msgt fd( ( sF /usr/lib/python2.7/site-packages/ansible/plugins/callback/log_plays.pyt log9 s (c C` s | j | d | � d S( Nt FAILED( R+ ( R R( t rest ignore_errors( ( sF /usr/lib/python2.7/site-packages/ansible/plugins/callback/log_plays.pyt runner_on_failedL s c C` s | j | d | � d S( Nt OK( R+ ( R R( R- ( ( sF /usr/lib/python2.7/site-packages/ansible/plugins/callback/log_plays.pyt runner_on_okO s c C` s | j | d d � d S( Nt SKIPPEDs ...( R+ ( R R( t item( ( sF /usr/lib/python2.7/site-packages/ansible/plugins/callback/log_plays.pyt runner_on_skippedR s c C` s | j | d | � d S( Nt UNREACHABLE( R+ ( R R( R- ( ( sF /usr/lib/python2.7/site-packages/ansible/plugins/callback/log_plays.pyt runner_on_unreachableU s c C` s | j | d | � d S( Nt ASYNC_FAILED( R+ ( R R( R- t jid( ( sF /usr/lib/python2.7/site-packages/ansible/plugins/callback/log_plays.pyt runner_on_async_failedX s c C` s | j | d | � d S( Nt IMPORTED( R+ ( R R( t imported_file( ( sF /usr/lib/python2.7/site-packages/ansible/plugins/callback/log_plays.pyt playbook_on_import_for_host[ s c C` s | j | d | � d S( Nt NOTIMPORTED( R+ ( R R( t missing_file( ( sF /usr/lib/python2.7/site-packages/ansible/plugins/callback/log_plays.pyt playbook_on_not_import_for_host^ s N( t __name__t __module__t __doc__t CALLBACK_VERSIONt CALLBACK_TYPEt CALLBACK_NAMEt Truet CALLBACK_NEEDS_WHITELISTR"