??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/class.bf1.my/wp-includes/js/dist/index.php:4) in /home/mybf1/public_html/class.bf1.my/wp-includes/js/dist/index.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/class.bf1.my/wp-includes/js/dist/index.php:4) in /home/mybf1/public_html/class.bf1.my/wp-includes/js/dist/index.php on line 174
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/class.bf1.my/wp-includes/js/dist/index.php:4) in /home/mybf1/public_html/class.bf1.my/wp-includes/js/dist/index.php on line 175
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/class.bf1.my/wp-includes/js/dist/index.php:4) in /home/mybf1/public_html/class.bf1.my/wp-includes/js/dist/index.php on line 176
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/class.bf1.my/wp-includes/js/dist/index.php:4) in /home/mybf1/public_html/class.bf1.my/wp-includes/js/dist/index.php on line 177
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/class.bf1.my/wp-includes/js/dist/index.php:4) in /home/mybf1/public_html/class.bf1.my/wp-includes/js/dist/index.php on line 178
Udac @` 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 y d d l m Z e Z Wn e k
r e Z n Xd Z d Z d
Z d Z d e
f d
YZ d S( i ( t absolute_importt divisiont print_functions
callback: logdna
callback_type: aggregate
short_description: Sends playbook logs to LogDNA
description:
- This callback will report logs from playbook actions, tasks, and events to LogDNA (https://app.logdna.com)
version_added: "2.7"
requirements:
- LogDNA Python Library (https://github.com/logdna/python)
- whitelisting in configuration
options:
conf_key:
required: True
description: LogDNA Ingestion Key
type: string
env:
- name: LOGDNA_INGESTION_KEY
ini:
- section: callback_logdna
key: conf_key
plugin_ignore_errors:
required: False
description: Whether to ignore errors on failing or not
type: boolean
env:
- name: ANSIBLE_IGNORE_ERRORS
ini:
- section: callback_logdna
key: plugin_ignore_errors
default: False
conf_hostname:
required: False
description: Alternative Host Name; the current host name by default
type: string
env:
- name: LOGDNA_HOSTNAME
ini:
- section: callback_logdna
key: conf_hostname
conf_tags:
required: False
description: Tags
type: string
env:
- name: LOGDNA_TAGS
ini:
- section: callback_logdna
key: conf_tags
default: ansible
N( t getnode( t CallbackBase( t AnsibleJSONEncoder( t
LogDNAHandlerc ` sB d t d j t f d t t t d S( Ns %012xt :c ` s | | d !S( Ni ( ( t index( t mac( sC /usr/lib/python2.7/site-packages/ansible/plugins/callback/logdna.pyt K s i ( R t joint mapt ranget intt len( ( ( R sC /usr/lib/python2.7/site-packages/ansible/plugins/callback/logdna.pyt get_macI s
c C` s t t j j d d S( Ns .locali ( t strt sockett gethostnamet split( ( ( sC /usr/lib/python2.7/site-packages/ansible/plugins/callback/logdna.pyt get_hostnameO s c C` s y t j t SWnw t k
r t j t j t j } z? y! | j d | j d } Wn t k
ry d } n XWd | j X| SXd S( Ns 10.255.255.255i i s 127.0.0.1( s 10.255.255.255i ( R t
gethostbynameR t Exceptiont AF_INETt
SOCK_DGRAMt connectt getsocknamet close( t st IP( ( sC /usr/lib/python2.7/site-packages/ansible/plugins/callback/logdna.pyt get_ipT s
c C` s: y! t j | d t d t t SWn t k
r5 t SXd S( Nt sort_keyst cls( t jsont dumpst TrueR R t False( t obj( ( sC /usr/lib/python2.7/site-packages/ansible/plugins/callback/logdna.pyt
isJSONabled s
t CallbackModulec B` s e Z d Z d Z d Z e Z d d Z d d d d Z d Z
d Z d Z d Z
d Z d
Z e d Z d Z d
Z d Z d Z RS( g?t aggregatet logdnac C` s\ t t | j d | t | _ d | _ d | _ d | _ d | _ d | _
d | _ d S( Nt display( t superR( t __init__R$ t disabledt Nonet
playbook_namet playbookt conf_keyt plugin_ignore_errorst
conf_hostnamet conf_tags( t selfR+ ( ( sC /usr/lib/python2.7/site-packages/ansible/plugins/callback/logdna.pyR- t s c C` sO t t | j d | d | d | | j d | _ | j d | _ | j d | _ | j d | _ t | _ t
| _ | j d k r t
| _ n | j j d | _ t r2t j d | _ | j j t j i | j d
6| j d 6t d 6| _ | j j t | j | j t | _ n t | _ | j j d
d S( Nt task_keyst var_optionst directR2 R3 R4 R5 t ,R* t hostnameR t
index_metasD WARNING:
Please, install LogDNA Python Package: `pip install logdna`( R, R( t set_optionst
get_optionR2 R3 R4 R5 R R R t ipR/ R R t
HAS_LOGDNAt loggingt getLoggert logt setLevelt INFOR$ t optionst
addHandlerR R% R. t _displayt warning( R6 R7 R8 R9 ( ( sC /usr/lib/python2.7/site-packages/ansible/plugins/callback/logdna.pyR= s$ %$ c C` s g } d } x@ | j D]2 \ } } t | s | j | | d 7} q q W| d k r x | D]
} | | =qb Wd d j | | d