??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.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
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: mail
type: notification
short_description: Sends failure events via email
description:
- This callback will report failures via email
version_added: '2.0'
author:
- Dag Wieers (@dagwieers)
requirements:
- whitelisting in configuration
options:
mta:
description: Mail Transfer Agent, server that accepts SMTP
env:
- name: SMTPHOST
ini:
- section: callback_mail
key: smtphost
version_added: '2.5'
default: localhost
mtaport:
description: Mail Transfer Agent Port, port at which server SMTP
ini:
- section: callback_mail
key: smtpport
version_added: '2.5'
default: 25
to:
description: Mail recipient
ini:
- section: callback_mail
key: to
version_added: '2.5'
default: root
sender:
description: Mail sender
ini:
- section: callback_mail
key: sender
version_added: '2.5'
cc:
description: CC'd recipient
ini:
- section: callback_mail
key: cc
version_added: '2.5'
bcc:
description: BCC'd recipient
ini:
- section: callback_mail
key: bcc
version_added: '2.5'
note:
- "TODO: expand configuration options now that plugins can leverage Ansible's configuration"
N( t string_types( t to_bytes( t AnsibleJSONEncoder( t CallbackBaset CallbackModulec B` sª e Z d Z d Z d Z d Z e Z d d „ Z d d d d „ Z
d d d „ Z d „ Z d d
„ Z
d „ Z d „ Z d
„ Z e d „ Z d „ Z d „ Z d „ Z RS( sB This Ansible callback plugin mails errors to interested parties. g @t notificationt mailc C` s_ t t | ƒ j d | ƒ d | _ d | _ t j d d ƒ | _ d | _ d | _
d | _ d S( Nt displayt roott SMTPHOSTt localhosti ( t superR t __init__t Nonet sendert tot ost getenvt smtphostt smtpportt cct bcc( t selfR
( ( sA /usr/lib/python2.7/site-packages/ansible/plugins/callback/mail.pyR T s c C` s› t t | ƒ j d | d | d | ƒ | j d ƒ | _ | j d ƒ | _ | j d ƒ | _ t | j d ƒ ƒ | _ | j d ƒ | _ | j d ƒ | _
d S(
Nt task_keyst var_optionst directR R t mtat mtaportR R ( R R t set_optionst
get_optionR R R t intR R R ( R R R R ( ( sA /usr/lib/python2.7/site-packages/ansible/plugins/callback/mail.pyR ] s %s Ansible error mailc
C` sM | d k r | } n t j | j d | j ƒ} t | j ƒ } t | j ƒ } t | j ƒ } t | j ƒ } t | ƒ } t | ƒ } d | }
|
d | 7}
| j r¶ |
d | 7}
n |
d | 7}
|
| 7}
| j
d ƒ } | j rü | | j
d ƒ 7} n | j r| | j
d ƒ 7} n x! | D] } | j | | |
ƒ q"W| j ƒ d S( Nt ports From: %s
s To: %s
s Cc: %s
s
Subject: %s
t ,(
R t smtplibt SMTPR R R R R R R t splitt sendmailt quit(
R t subjectt bodyt smtpt b_sendert b_tot b_cct b_bcct b_subjectt b_bodyt b_contentt b_addressest b_address( ( sA /usr/lib/python2.7/site-packages/ansible/plugins/callback/mail.pyR h s.
c C` s! d | | j d ƒ j ƒ | f S( Ns %s: %ss
( t stript
splitlines( R t multilinet failtypet linenr( ( sA /usr/lib/python2.7/site-packages/ansible/plugins/callback/mail.pyt subject_msg‡ s i c C` s t j d d | | d t j ƒS( Nt ^t t flags( t ret subt MULTILINE( R R7 t indent( ( sA /usr/lib/python2.7/site-packages/ansible/plugins/callback/mail.pyRA Š s c C` sS d | } d } x+ | j d ƒ j ƒ D] } | d | 7} q&