�
�Udac @` sb d d l m Z m Z m Z e Z d 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: oneline
type: stdout
short_description: oneline Ansible screen output
version_added: historical
description:
- This is the output callback used by the -o/--one-line command line option.
( t CallbackBase( t constantst CallbackModulec B` sP e Z d Z d Z d Z d Z d � Z e d � Z d � Z d � Z
d � Z RS( s�
This is the default callback interface, which simply prints messages
to stdout when new callback events are received.
g @t stdoutt onelinec C` s� | j d d � j d d � j d d � } d | k r� | d r� | j d d � j d d � j d d � } d | | | j d d
� | | f Sd | | | j d d
� | f Sd S( NR t s
s \ns
s \rt stderrs) %s | %s | rc=%s | (stdout) %s (stderr) %st rci����s %s | %s | rc=%s | (stdout) %s( t gett replace( t selft hostnamet resultt captionR R ( ( sD /usr/lib/python2.7/site-packages/ansible/plugins/callback/oneline.pyt _command_generic_msg! s
**#c C` s0 d | j k r� | j j d k rN | j d j � j d � d } d | } n d | j d j d d � } | j j t j k r� d | j k r� | j j
| j | j j
� | j d � d
t j �q� | j j
| d
t j �n | j j
d | j j
� | j | j d d
�j d d � f d
t j �d S( Nt exceptioni s
i����sc An exception occurred during task execution. To see the full traceback, use -vvv. The error was: %ssD An exception occurred during task execution. The full traceback is:
R t
module_stderrt FAILEDt colors %s | FAILED! => %st indenti ( t _resultt _displayt verbosityt stript splitR t _taskt actiont Ct MODULE_NO_JSONt displayR t _hostt get_namet COLOR_ERRORt
_dump_results( R
R t
ignore_errorst errort msg( ( sD /usr/lib/python2.7/site-packages/ansible/plugins/callback/oneline.pyt v2_runner_on_failed) s
$7@c C` s� | j j d t � r'