??????????????
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 m Z dd lmZd ZdefdYZdZedkrend S(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontstableinterfacetstatust communityt supported_bysS --- module: svc author: - Brian Coca (@bcoca) version_added: "1.9" short_description: Manage daemontools services description: - Controls daemontools services on remote hosts using the svc utility. options: name: description: - Name of the service to manage. type: str required: true state: description: - C(Started)/C(stopped) are idempotent actions that will not run commands unless necessary. C(restarted) will always bounce the svc (svc -t) and C(killed) will always bounce the svc (svc -k). C(reloaded) will send a sigusr1 (svc -1). C(once) will run a normally downed svc once (svc -o), not really an idempotent operation. type: str choices: [ killed, once, reloaded, restarted, started, stopped ] downed: description: - Should a 'down' file exist or not, if it exists it disables auto startup. Defaults to no. Downed does not imply stopped. type: bool default: no enabled: description: - Whether the service is enabled or not, if disabled it also implies stopped. Take note that a service can be enabled and downed (no auto restart). type: bool service_dir: description: - Directory svscan watches for services type: str default: /service service_src: description: - Directory where services are defined, the source of symlinks to service_dir. type: str default: /etc/service s4 - name: Start svc dnscache, if not running svc: name: dnscache state: started - name: Stop svc dnscache, if running svc: name: dnscache state: stopped - name: Kill svc dnscache, in all cases svc: name: dnscache state: killed - name: Restart svc dnscache, in all cases svc: name: dnscache state: restarted - name: Reload svc dnscache, in all cases svc: name: dnscache state: reloaded - name: Using alternative svc directory location svc: name: dnscache state: reloaded service_dir: /var/service N(t AnsibleModule(t to_nativecO`sd}|djd}|dk rdx>|jD]-}|jdk r0|j|kr0|}q0q0Wn|dkry|}nt||j|S(s- Used for derivative implementations tmoduletdistroN(tNonetparamst__subclasses__R tsupert__new__(tclstargstkwargstsubclassR tsc((s>/usr/lib/python2.7/site-packages/ansible/modules/system/svc.pyt_load_dist_subclassgs   tSvccB`seZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZRS(s Main class that handles daemontools, can be subclassed and overridden in case we want to use a 'derivative' like encore, s6, etc cC`sddg|_ddddddd d g|_||_|jd |_|jd |_|jd |_d|_d|_ d|_ d|_ d|_ d|_ |jdd|j|_|jdd|j|_dj|j|jg|_dj|j|jg|_tjj|j|_|jr[tjjd|j|_ |jn%tjjd|j|_ d|_ dS(Ns/commands/usr/local/bintstatetenabledtdownedtsvc_fulltsrc_fulltpidtdurationt full_statetnamet service_dirt service_srctsvctopt_dirstsvstatt/s%s/downtstopped(t extra_pathst report_varsR R R R!R"R RRRRRRt get_bin_pathtsvc_cmdt svstat_cmdtjoinRRtostpathtlexistst get_status(tselfR ((s>/usr/lib/python2.7/site-packages/ansible/modules/system/svc.pyt__init__s,!         cC`stjj|jrnytj|j|jWqtk rj}|jjd|jddt |qXn|jjdd|jdS(NR/tmsgsError while linking: %ss1Could not find source for service to enable (%s).( R.R/texistsRtsymlinkRtOSErrorR t fail_jsonR (R2te((s>/usr/lib/python2.7/site-packages/ansible/modules/system/svc.pytenables -cC`sytj|jWn9tk rO}|jjd|jddt|nX|j|jd|j gd|j }tj j |r|j|jd|gndS(NR/R4sError while unlinking: %ss-dxs%s/log( R.tunlinkRR7R R8R texecute_commandR+RR/R5(R2R9tsrc_log((s>/usr/lib/python2.7/site-packages/ansible/modules/system/svc.pytdisables* cC`s,|j|j|jg\}}}|dk rI|rI||_|_n||_tjd|}|r|jd|_ ntjd|}|r|jd|_ ntjd|rd|_n+tjd|rd|_n d|_dStjd |r|jd 7_n|jd 7_dS( Ns \(pid (\d+)\)is (\d+) secondss up tstarts down tstopptunknowns want tingted( R<R,RR RRtretsearchtgroupRR(R2trctoutterrtm((s>/usr/lib/python2.7/site-packages/ansible/modules/system/svc.pyR1s&$    cC`s|j|jd|jgS(Ns-u(R<R+R(R2((s>/usr/lib/python2.7/site-packages/ansible/modules/system/svc.pyR?scC`s |jS(N(tstop(R2((s>/usr/lib/python2.7/site-packages/ansible/modules/system/svc.pyR@scC`s|j|jd|jgS(Ns-d(R<R+R(R2((s>/usr/lib/python2.7/site-packages/ansible/modules/system/svc.pyRKscC`s|j|jd|jgS(Ns-o(R<R+R(R2((s>/usr/lib/python2.7/site-packages/ansible/modules/system/svc.pytoncescC`s|j|jd|jgS(Ns-1(R<R+R(R2((s>/usr/lib/python2.7/site-packages/ansible/modules/system/svc.pytreloadscC`s|j|jd|jgS(Ns-t(R<R+R(R2((s>/usr/lib/python2.7/site-packages/ansible/modules/system/svc.pytrestartscC`s|j|jd|jgS(Ns-k(R<R+R(R2((s>/usr/lib/python2.7/site-packages/ansible/modules/system/svc.pytkillscC`sty(|jjdj|\}}}Wn<tk rf}|jjddt|dtjnX|||fS(Nt R4sfailed to execute: %st exception(R t run_commandR-t ExceptionR8R t tracebackt format_exc(R2tcmdRGRHRIR9((s>/usr/lib/python2.7/site-packages/ansible/modules/system/svc.pyR<s (-cC`s9|ji}x"|jD]}|j|||/usr/lib/python2.7/site-packages/ansible/modules/system/svc.pytreports  (t__name__t __module__t__doc__R3R:R>R1R?R@RKRLRMRNROR<RZ(((s>/usr/lib/python2.7/site-packages/ansible/modules/system/svc.pyRzs          c C`stdtdtdddtdtddddd d d d d gdtdddtdddtdddddtdddddt}tdddddddd|_|jd}|jd}|jd}t|}t}|j}|dk r||j krt}|j sy!|rE|j n |j Wqt tfk r}|jddt|qXqn|dk r||jkrt}|j st||d qn|dk rp||jkrpt}|j spd|j}y-|r&t|d jn tj|Wqmt tfk ri}|jdd!t|qmXqpn|jd"|d#|jdS($Nt argument_specR ttypetstrtrequiredRtchoicestkilledRLtreloadedt restartedtstartedR'RtboolRR!tdefaults/serviceR"s /etc/servicetsupports_check_modetLANGtCtLC_ALLt LC_MESSAGEStLC_CTYPER4s!Could not change service link: %sis%s/downtas!Could not change downed file: %s tchangedR#(RtdicttTruetrun_command_environ_updateR RtFalseRZR Rt check_modeR:R>R7tIOErrorR8R RtgetattrRRtopentcloseR.R;t exit_json( R RRRR#Rpt orig_stateR9td_file((s>/usr/lib/python2.7/site-packages/ansible/modules/system/svc.pytmainsP' $       $   $t__main__(t __future__RRRR_t __metaclass__tANSIBLE_METADATAt DOCUMENTATIONtEXAMPLESR.RDRTtansible.module_utils.basicRtansible.module_utils._textR RtobjectRR}R[(((s>/usr/lib/python2.7/site-packages/ansible/modules/system/svc.pyts    0!    ~ 6