??????????????
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@`sddlmZmZmZeZidd6dgd6dd6ZdZd Zdd l Z dd l Z dd l Z dd l mZd Zd ZdefdYZedkrend S(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust communityt supported_bys --- module: nagios short_description: Perform common tasks in Nagios related to downtime and notifications. description: - "The C(nagios) module has two basic functions: scheduling downtime and toggling alerts for services or hosts." - All actions require the I(host) parameter to be given explicitly. In playbooks you can use the C({{inventory_hostname}}) variable to refer to the host the playbook is currently running on. - You can specify multiple services at once by separating them with commas, .e.g., C(services=httpd,nfs,puppet). - When specifying what service to handle there is a special service value, I(host), which will handle alerts/downtime for the I(host itself), e.g., C(service=host). This keyword may not be given with other services at the same time. I(Setting alerts/downtime for a host does not affect alerts/downtime for any of the services running on it.) To schedule downtime for all services on particular host use keyword "all", e.g., C(service=all). - When using the C(nagios) module you will need to specify your Nagios server using the C(delegate_to) parameter. version_added: "0.7" options: action: description: - Action to take. - servicegroup options were added in 2.0. - delete_downtime options were added in 2.2. required: true choices: [ "downtime", "delete_downtime", "enable_alerts", "disable_alerts", "silence", "unsilence", "silence_nagios", "unsilence_nagios", "command", "servicegroup_service_downtime", "servicegroup_host_downtime" ] host: description: - Host to operate on in Nagios. cmdfile: description: - Path to the nagios I(command file) (FIFO pipe). Only required if auto-detection fails. default: auto-detected author: description: - Author to leave downtime comments as. Only usable with the C(downtime) action. default: Ansible comment: version_added: "2.0" description: - Comment for C(downtime) action. default: Scheduling downtime minutes: description: - Minutes to schedule downtime for. - Only usable with the C(downtime) action. type: int default: 30 services: description: - What to manage downtime/alerts for. Separate multiple services with commas. C(service) is an alias for C(services). B(Required) option when using the C(downtime), C(enable_alerts), and C(disable_alerts) actions. aliases: [ "service" ] required: true servicegroup: version_added: "2.0" description: - The Servicegroup we want to set downtimes/alerts for. B(Required) option when using the C(servicegroup_service_downtime) amd C(servicegroup_host_downtime). command: description: - The raw command to send to nagios, which should not include the submitted time header or the line-feed B(Required) option when using the C(command) action. required: true author: "Tim Bielawa (@tbielawa)" s # set 30 minutes of apache downtime - nagios: action: downtime minutes: 30 service: httpd host: '{{ inventory_hostname }}' # schedule an hour of HOST downtime - nagios: action: downtime minutes: 60 service: host host: '{{ inventory_hostname }}' # schedule an hour of HOST downtime, with a comment describing the reason - nagios: action: downtime minutes: 60 service: host host: '{{ inventory_hostname }}' comment: Rebuilding machine # schedule downtime for ALL services on HOST - nagios: action: downtime minutes: 45 service: all host: '{{ inventory_hostname }}' # schedule downtime for a few services - nagios: action: downtime services: frob,foobar,qeuz host: '{{ inventory_hostname }}' # set 30 minutes downtime for all services in servicegroup foo - nagios: action: servicegroup_service_downtime minutes: 30 servicegroup: foo host: '{{ inventory_hostname }}' # set 30 minutes downtime for all host in servicegroup foo - nagios: action: servicegroup_host_downtime minutes: 30 servicegroup: foo host: '{{ inventory_hostname }}' # delete all downtime for a given host - nagios: action: delete_downtime host: '{{ inventory_hostname }}' service: all # delete all downtime for HOST with a particular comment - nagios: action: delete_downtime host: '{{ inventory_hostname }}' service: host comment: Planned maintenance # enable SMART disk alerts - nagios: action: enable_alerts service: smart host: '{{ inventory_hostname }}' # "two services at once: disable httpd and nfs alerts" - nagios: action: disable_alerts service: httpd,nfs host: '{{ inventory_hostname }}' # disable HOST alerts - nagios: action: disable_alerts service: host host: '{{ inventory_hostname }}' # silence ALL alerts - nagios: action: silence host: '{{ inventory_hostname }}' # unsilence all alerts - nagios: action: unsilence host: '{{ inventory_hostname }}' # SHUT UP NAGIOS - nagios: action: silence_nagios # ANNOY ME NAGIOS - nagios: action: unsilence_nagios # command something - nagios: action: command command: DISABLE_FAILURE_PREDICTION N(t AnsibleModulec C`sddddddddd d d d g }x`|D]X}tjj|r1x=t|D],}|jd rV|jddjSqVWq1q1WdS(Ns/etc/nagios/nagios.cfgs/etc/nagios3/nagios.cfgs/etc/nagios2/nagios.cfgs /usr/local/etc/nagios/nagios.cfgs+/usr/local/groundwork/nagios/etc/nagios.cfgs%/omd/sites/oppy/tmp/nagios/nagios.cfgs /usr/local/nagios/etc/nagios.cfgs/usr/local/nagios/nagios.cfgs/opt/nagios/etc/nagios.cfgs/opt/nagios/nagios.cfgs/etc/icinga/icinga.cfgs /usr/local/icinga/etc/icinga.cfgt command_filet=i(tostpathtexiststopent startswithtsplittstriptNone(t locationsR tline((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pyt which_cmdfiles$  "c C`sddddddddd d d g }td td tdtddd|dtdddtdddtdtdddtdtdddtdddddtdtdtddddgd tdtdd }|jd }|jd}|jd}|jd}|jd}|jd }|d'krf|sf|jdd qfn|dkr|s|jdd!qn|dkr|s|jdd!qn|d(kr|s|jdd"qn|d)kr|s|jdd#qn|d*kr.|s.|jdd$q.n|sG|jdd%nt||j}|j ru|j d&tn |j dS(+Ntdowntimetdelete_downtimetsilencet unsilencet enable_alertstdisable_alertstsilence_nagiostunsilence_nagiostcommandtservicegroup_host_downtimetservicegroup_service_downtimet argument_spectactiontrequiredtdefaulttchoicestauthortAnsibletcommentsScheduling downtimethostt servicegrouptminutesittypetinttcmdfiletservicestaliasestservicetmsgs*no host specified for action requiring ones'no service selected to set downtime fors,no servicegroup selected to set downtime fors)a service is required when setting alertss$no command passed for command actionsunable to locate nagios.cfgtchanged(scommandssilence_nagiossunsilence_nagios(R R(RR(scommand( RtdicttTrueRtFalseRtparamst fail_jsontNagiost check_modet exit_jsontact( tACTION_CHOICEStmoduleR"R)R*R/R.Rtansible_nagios((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pytmainsh             R9cB`seZdZdZdZdZd&d&d&d&dddZd&d&d&dZd&d&dZ d&d d Z d d Z d d Z d&d&d Z d dZd dZd dZd dZdZdZd&dZdZdZdZdZdZdZd&dZdZdZdZdZd Z d!Z!d"Z"d#Z#d$Z$d%Z%RS('s Perform common tasks in Nagios related to downtime and notifications. The complete set of external commands Nagios handles is documented on their website: http://old.nagios.org/developerinfo/externalcommands/commandlist.php Note that in the case of `schedule_svc_downtime`, `enable_svc_notifications`, and `disable_svc_notifications`, the service argument should be passed as a list. cK`s||_|d|_|d|_|d|_|d|_|d|_|d|_|d|_|d|_|d dks|d dks|d d kr|d |_ n|d j d |_ g|_ dS( NR"R&R(R)R*R+R.RR/tallt,( R>R"R&R(R)R*R+R.RRR/Rtcommand_results(tselfR>tkwargs((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pyt__init__\s         0cC`sttjS(sB The time in seconds since 12:00:00AM Jan 1, 1970 (R-ttime(RD((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pyt_nownscC`stjj|js4|jjddd|jntjtj|jjsq|jjddd|jnyMt |jd}|j ||j |j |j j|jWn-tk r|jjddd|jnXdS(sD Write the given command to the Nagios command file R2s"nagios command file does not existR.s&nagios command file is not a fifo filetws&unable to write to nagios command fileN(R R R R.R>R8tstattS_ISFIFOtst_modeRtwritetflushtcloseRCtappendRtIOError(RDtcmdtfp((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pyt_write_commandus      iic C`s|j} |dkr!| }nd| ||f} |d} || } |sZ|j}n|sl|j}n|dk r|t|t| t|t| t| ||g}n9t|t| t|t| t| ||g}dj|}| |d}|S(sH Format an external-command downtime string. cmd - Nagios command ID host - Host schedule downtime on duration - Minutes to schedule downtime for author - Name to file the downtime as comment - Reason for running this command (upgrade, reboot, etc) start - Start of downtime in seconds since 12:00AM Jan 1 1970 Default is to use the entry time (now) svc - Service to schedule downtime for, omit when for host downtime fixed - Start now if 1, start when a problem is detected if 0 trigger - Optional ID of event to start downtime from. Leave as 0 for fixed downtime. Syntax: [submitted] COMMAND;;[] ;;;;;; s [%s] %s;%s;i<t;s N(RHRR&R(tstrtjoin(RDRRR)tdurationR&R(tstarttsvctfixedttriggert entry_timethdrt duration_stendtdt_argst dt_arg_strtdt_str((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pyt _fmt_dt_strs$        '$c C`s|j}d|||f}|dkr7|j}ng}|dk rY|j|n |jd|dk r|jt|n |jd|dk r|j|n |jddj|} || d} | S(s Format an external-command downtime deletion string. cmd - Nagios command ID host - Host to remove scheduled downtime from comment - Reason downtime was added (upgrade, reboot, etc) start - Start of downtime in seconds since 12:00AM Jan 1 1970 svc - Service to remove downtime for, omit to remove all downtime for the host Syntax: [submitted] COMMAND;; [];[];[] s [%s] %s;%s;tRUs N(RHRR(RPRVRW( RDRRR)RZRYR(R]R^t dt_del_argstdt_del_arg_strt dt_del_str((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pyt_fmt_dt_del_strs"         cC`sd|j}d||f}|dk rV|d|7}|dk rV|d|7}qVn|d7}|S(s| Format an external-command notification string. cmd - Nagios command ID. host - Host to en/disable notifications on.. A value is not required for global downtime svc - Service to schedule downtime for. A value is not required for host downtime. Syntax: [submitted] COMMAND;[;] s[%s] %ss;%ss N(RHR(RDRRR)RZR]t notif_str((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pyt_fmt_notif_strs    icC`sXd}|dkrg}nx6|D].}|j|||d|}|j|q"WdS(sl This command is used to schedule downtime for a particular service. During the specified downtime, Nagios will not send notifications out about the service. Syntax: SCHEDULE_SVC_DOWNTIME;; ;;;;;; tSCHEDULE_SVC_DOWNTIMERZN(RRdRT(RDR)R/R+RRR1t dt_cmd_str((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pytschedule_svc_downtimes    cC`s,d}|j|||}|j|dS(sI This command is used to schedule downtime for a particular host. During the specified downtime, Nagios will not send notifications out about the host. Syntax: SCHEDULE_HOST_DOWNTIME;;;; ;;;; tSCHEDULE_HOST_DOWNTIMEN(RdRT(RDR)R+RRRm((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pytschedule_host_downtimes cC`s,d}|j|||}|j|dS(sb This command is used to schedule downtime for all services associated with a particular host. During the specified downtime, Nagios will not send notifications out about the host. SCHEDULE_HOST_SVC_DOWNTIME;;;; ;;;; tSCHEDULE_HOST_SVC_DOWNTIMEN(RdRT(RDR)R+RRRm((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pytschedule_host_svc_downtime$s cC`szd}|dkr:|j||d|}|j|n<x9|D]1}|j||d|d|}|j|qAWdS(s This command is used to remove scheduled downtime for a particular host. Syntax: DEL_DOWNTIME_BY_HOST_NAME;; [];[];[] tDEL_DOWNTIME_BY_HOST_NAMER(RZN(RRiRT(RDR)R/R(RRtdt_del_cmd_strR1((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pytdelete_host_downtime4s   cC`s,d}|j|||}|j|dS(sk This command is used to schedule downtime for all hosts in a particular hostgroup. During the specified downtime, Nagios will not send notifications out about the hosts. Syntax: SCHEDULE_HOSTGROUP_HOST_DOWNTIME;;; ;;;;; t SCHEDULE_HOSTGROUP_HOST_DOWNTIMEN(RdRT(RDt hostgroupR+RRRm((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pyt schedule_hostgroup_host_downtimeGs cC`s,d}|j|||}|j|dS(s This command is used to schedule downtime for all services in a particular hostgroup. During the specified downtime, Nagios will not send notifications out about the services. Note that scheduling downtime for services does not automatically schedule downtime for the hosts those services are associated with. Syntax: SCHEDULE_HOSTGROUP_SVC_DOWNTIME;;; ;;;;; tSCHEDULE_HOSTGROUP_SVC_DOWNTIMEN(RdRT(RDRwR+RRRm((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pytschedule_hostgroup_svc_downtimeWscC`s,d}|j|||}|j|dS(s} This command is used to schedule downtime for all hosts in a particular servicegroup. During the specified downtime, Nagios will not send notifications out about the hosts. Syntax: SCHEDULE_SERVICEGROUP_HOST_DOWNTIME;; ;;;;;; t#SCHEDULE_SERVICEGROUP_HOST_DOWNTIMEN(RdRT(RDR*R+RRRm((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pyt#schedule_servicegroup_host_downtimeks cC`s,d}|j|||}|j|dS(s! This command is used to schedule downtime for all services in a particular servicegroup. During the specified downtime, Nagios will not send notifications out about the services. Note that scheduling downtime for services does not automatically schedule downtime for the hosts those services are associated with. Syntax: SCHEDULE_SERVICEGROUP_SVC_DOWNTIME;; ;;;;;; t"SCHEDULE_SERVICEGROUP_SVC_DOWNTIMEN(RdRT(RDR*R+RRRm((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pyt"schedule_servicegroup_svc_downtime|scC`s)d}|j||}|j|dS(s* This command is used to prevent notifications from being sent out for all services on the specified host. Note that this command does not disable notifications from being sent out about the host. Syntax: DISABLE_HOST_SVC_NOTIFICATIONS; tDISABLE_HOST_SVC_NOTIFICATIONSN(RkRT(RDR)RRRj((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pytdisable_host_svc_notificationss cC`s)d}|j||}|j|dS(s This command is used to prevent notifications from being sent out for the specified host. Note that this command does not disable notifications for services associated with this host. Syntax: DISABLE_HOST_NOTIFICATIONS; tDISABLE_HOST_NOTIFICATIONSN(RkRT(RDR)RRRj((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pytdisable_host_notificationss cC`sUd}|dkrg}nx3|D]+}|j||d|}|j|q"WdS(s. This command is used to prevent notifications from being sent out for the specified service. Note that this command does not disable notifications from being sent out about the host. Syntax: DISABLE_SVC_NOTIFICATIONS;; tDISABLE_SVC_NOTIFICATIONSRZN(RRkRT(RDR)R/RRR1Rj((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pytdisable_svc_notificationss    cC`s)d}|j||}|j|dS(sV This command is used to prevent notifications from being sent out for all hosts in the specified servicegroup. Note that this command does not disable notifications for services associated with hosts in this service group. Syntax: DISABLE_SERVICEGROUP_HOST_NOTIFICATIONS; t'DISABLE_SERVICEGROUP_HOST_NOTIFICATIONSN(RkRT(RDR*RRRj((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pyt'disable_servicegroup_host_notificationss cC`s)d}|j||}|j|dS(sP This command is used to prevent notifications from being sent out for all services in the specified servicegroup. Note that this does not prevent notifications from being sent out about the hosts in this servicegroup. Syntax: DISABLE_SERVICEGROUP_SVC_NOTIFICATIONS; t&DISABLE_SERVICEGROUP_SVC_NOTIFICATIONSN(RkRT(RDR*RRRj((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pyt&disable_servicegroup_svc_notificationss cC`s)d}|j||}|j|dS(sc Disables notifications for all hosts in a particular hostgroup. Note that this does not disable notifications for the services associated with the hosts in the hostgroup - see the DISABLE_HOSTGROUP_SVC_NOTIFICATIONS command for that. Syntax: DISABLE_HOSTGROUP_HOST_NOTIFICATIONS; t$DISABLE_HOSTGROUP_HOST_NOTIFICATIONSN(RkRT(RDRwRRRj((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pyt$disable_hostgroup_host_notificationss cC`s)d}|j||}|j|dS(s_ Disables notifications for all services associated with hosts in a particular hostgroup. Note that this does not disable notifications for the hosts in the hostgroup - see the DISABLE_HOSTGROUP_HOST_NOTIFICATIONS command for that. Syntax: DISABLE_HOSTGROUP_SVC_NOTIFICATIONS; t#DISABLE_HOSTGROUP_SVC_NOTIFICATIONSN(RkRT(RDRwRRRj((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pyt#disable_hostgroup_svc_notificationss cC`s)d}|j||}|j|dS(s Enables notifications for a particular host. Note that this command does not enable notifications for services associated with this host. Syntax: ENABLE_HOST_NOTIFICATIONS; tENABLE_HOST_NOTIFICATIONSN(RkRT(RDR)RRRj((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pytenable_host_notificationss cC`s9d}|j||}|j|}|r1|SdSdS(s Enables notifications for all services on the specified host. Note that this does not enable notifications for the host. Syntax: ENABLE_HOST_SVC_NOTIFICATIONS; tENABLE_HOST_SVC_NOTIFICATIONSs)Fail: could not write to the command fileN(RkRT(RDR)RRRjt nagios_return((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pytenable_host_svc_notificationss cC`sd}|dkrg}nt}g}xH|D]@}|j||d|}|j|o^|}|j|q.W|r||SdSdS(s Enables notifications for a particular service. Note that this does not enable notifications for the host. Syntax: ENABLE_SVC_NOTIFICATIONS;; tENABLE_SVC_NOTIFICATIONSRZs)Fail: could not write to the command fileN(RR5RkRTRP(RDR)R/RRRtreturn_str_listR1Rj((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pytenable_svc_notifications!s    cC`s9d}|j||}|j|}|r1|SdSdS(s Enables notifications for all hosts in a particular hostgroup. Note that this command does not enable notifications for services associated with the hosts in this hostgroup. Syntax: ENABLE_HOSTGROUP_HOST_NOTIFICATIONS; t#ENABLE_HOSTGROUP_HOST_NOTIFICATIONSs)Fail: could not write to the command fileN(RkRT(RDRwRRRjR((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pyt#enable_hostgroup_host_notifications;s cC`s9d}|j||}|j|}|r1|SdSdS(s Enables notifications for all services that are associated with hosts in a particular hostgroup. Note that this does not enable notifications for the hosts in this hostgroup. Syntax: ENABLE_HOSTGROUP_SVC_NOTIFICATIONS; t"ENABLE_HOSTGROUP_SVC_NOTIFICATIONSs)Fail: could not write to the command fileN(RkRT(RDRwRRRjR((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pyt"enable_hostgroup_svc_notificationsNs cC`s9d}|j||}|j|}|r1|SdSdS(sN Enables notifications for all hosts that have services that are members of a particular servicegroup. Note that this command does not enable notifications for services associated with the hosts in this servicegroup. Syntax: ENABLE_SERVICEGROUP_HOST_NOTIFICATIONS; t&ENABLE_SERVICEGROUP_HOST_NOTIFICATIONSs)Fail: could not write to the command fileN(RkRT(RDR*RRRjR((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pyt&enable_servicegroup_host_notificationsbs cC`s9d}|j||}|j|}|r1|SdSdS(s Enables notifications for all services that are members of a particular servicegroup. Note that this does not enable notifications for the hosts in this servicegroup. Syntax: ENABLE_SERVICEGROUP_SVC_NOTIFICATIONS; t%ENABLE_SERVICEGROUP_SVC_NOTIFICATIONSs)Fail: could not write to the command fileN(RkRT(RDR*RRRjR((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pyt%enable_servicegroup_svc_notificationsvs cC`soddg}t}g}xB|D]:}|j||}|j|oI|}|j|qW|rg|SdSdS(sq This command is used to prevent notifications from being sent out for the host and all services on the specified host. This is equivalent to calling disable_host_svc_notifications and disable_host_notifications. Syntax: DISABLE_HOST_SVC_NOTIFICATIONS; Syntax: DISABLE_HOST_NOTIFICATIONS; RRs)Fail: could not write to the command fileN(R5RkRTRP(RDR)RRRRtcRj((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pyt silence_hosts   cC`soddg}t}g}xB|D]:}|j||}|j|oI|}|j|qW|rg|SdSdS(sX This command is used to enable notifications for the host and all services on the specified host. This is equivalent to calling enable_host_svc_notifications and enable_host_notifications. Syntax: ENABLE_HOST_SVC_NOTIFICATIONS; Syntax: ENABLE_HOST_NOTIFICATIONS; RRs)Fail: could not write to the command fileN(R5RkRTRP(RDR)RRRRRRj((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pytunsilence_hosts   cC`s d}|j|j|dS(s This command is used to disable notifications for all hosts and services in nagios. This is a 'SHUT UP, NAGIOS' command tDISABLE_NOTIFICATIONSN(RTRk(RDRR((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pyRscC`s d}|j|j|dS(s This command is used to enable notifications for all hosts and services in nagios. This is a 'OK, NAGIOS, GO'' command tENABLE_NOTIFICATIONSN(RTRk(RDRR((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pyRscC`s@dttj}d}d|||f}|j|dS(s This sends an arbitrary command to nagios It prepends the submitted time and appends a You just have to provide the properly formatted command s[%s]s s%s %s%sN(R-RGRT(RDRRtpretposttcmdstr((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pyt nagios_cmds cC`s#|jdkr|jdkr7|j|j|jq|jdkr_|j|j|jq|j|jd|jd|jn|jdkr|jdkr|j|jq|jdkr|j|jddq|j|jd|jn |jd kr3|jr|j d |jd|jqn|jd krm|jr|j d |jd|jqn|jd kr|j |jnt|jd kr|j |jnR|jdkr |jdkr|j |jq|jdkr|j|jq|j|jd|jn|jdkr|jdkrQ|j|jq|jdkrs|j|jq|j|jd|jnt|jdkr|jnX|jdkr|jn<|jdkr|j|jn|jjdd|j|jjd|jdtdS(sq Figure out what you want to do from ansible, and then do the needful (at the earliest). RR)RAR/R+RR(ReRR*R RRRRRRRR2sunknown action specified: '%s'tnagios_commandsR3N(R"R/RpR)R+RrRnRuR*R|R~RRRRRRRRRRRRR>R8R;RCR5(RD((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pyR<s`   " "     N(&t__name__t __module__t__doc__RFRHRTRRdRiRkRnRpRrRuRxRzR|R~RRRRRRRRRRRRRRRRRRRR<(((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pyR9MsJ    0)                       t__main__(t __future__RRRR,t __metaclass__tANSIBLE_METADATAt DOCUMENTATIONtEXAMPLESRGtos.pathR RJtansible.module_utils.basicRRR@tobjectR9R(((sE/usr/lib/python2.7/site-packages/ansible/modules/monitoring/nagios.pyt s"   Hi    $ [