??????????????
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 m Z dd l mZd ZdefdYZdZedkrend S(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontstableinterfacetstatust communityt supported_bys+ --- module: runit author: - James Sumners (@jsumners) version_added: "2.3" short_description: Manage runit services description: - Controls runit services on remote hosts using the sv utility. options: name: description: - Name of the service to manage. type: str required: yes state: description: - C(started)/C(stopped) are idempotent actions that will not run commands unless necessary. C(restarted) will always bounce the service (sv restart) and C(killed) will always bounce the service (sv force-stop). C(reloaded) will send a HUP (sv reload). C(once) will run a normally downed sv once (sv once), not really an idempotent operation. type: str choices: [ killed, once, reloaded, restarted, started, stopped ] enabled: description: - Whether the service is enabled or not, if disabled it also implies stopped. type: bool service_dir: description: - directory runsv watches for services type: str default: /var/service service_src: description: - directory where services are defined, the source of symlinks to service_dir. type: str default: /etc/sv s8 - name: Start sv dnscache, if not running runit: name: dnscache state: started - name: Stop sv dnscache, if running runit: name: dnscache state: stopped - name: Kill sv dnscache, in all cases runit: name: dnscache state: killed - name: Restart sv dnscache, in all cases runit: name: dnscache state: restarted - name: Reload sv dnscache, in all cases runit: name: dnscache state: reloaded - name: Use alternative sv directory location runit: name: dnscache state: reloaded service_dir: /run/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/runit.pyt_load_dist_subclassas   tSvcB`seZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdZdZdZRS(s Main class that handles daemontools, can be subclassed and overridden in case we want to use a 'derivative' like encore, s6, etc cC`s@g|_dddddddg|_||_|jd|_|jd |_|jd |_d|_d|_ d|_ d|_ d|_ |j d d |jd t|_|j d d |j|_dj|j|jg|_dj|j|jg|_tjj|j|_|jr3|jn d|_ dS(Ntstatetenabledtsvc_fulltsrc_fulltpidtdurationt full_statetnamet service_dirt service_srctsvtopt_dirstrequiredt/tstopped(t extra_pathst report_varsR R RR R!R RRRRRt get_bin_pathtTruetsvc_cmdt svstat_cmdtjoinRRtostpathtlexistst get_status(tselfR ((s@/usr/lib/python2.7/site-packages/ansible/modules/system/runit.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/runit.pytenables -cC`sp|j|jd|jgytj|jWn9tk rk}|jjd|jddt |nXdS(Ns force-stopR/R4sError while unlinking: %s( texecute_commandR+RR.tunlinkRR7R R8R (R2R9((s@/usr/lib/python2.7/site-packages/ansible/modules/system/runit.pytdisables cC`s|j|jd|jg\}}}|dk rL|rL||_|_n||_|jjdd}tjd|}|r|j d|_ ntjd|}|r|j d|_ ntjd|rd|_n+tjd |rd |_n d |_dSdS( NRs; is \(pid (\d+)\)is (\d+)ss^run:tstarteds^down:R&tunknown( R;R,RR RRtsplittretsearchtgroupRR(R2trctoutterrtfull_state_no_loggertm((s@/usr/lib/python2.7/site-packages/ansible/modules/system/runit.pyR1s"'    cC`s |jS(N(tstart(R2((s@/usr/lib/python2.7/site-packages/ansible/modules/system/runit.pyR>scC`s|j|jd|jgS(NRI(R;R+R(R2((s@/usr/lib/python2.7/site-packages/ansible/modules/system/runit.pyRIscC`s |jS(N(tstop(R2((s@/usr/lib/python2.7/site-packages/ansible/modules/system/runit.pyR&scC`s|j|jd|jgS(NRJ(R;R+R(R2((s@/usr/lib/python2.7/site-packages/ansible/modules/system/runit.pyRJscC`s|j|jd|jgS(Ntonce(R;R+R(R2((s@/usr/lib/python2.7/site-packages/ansible/modules/system/runit.pyRKscC`s |jS(N(treload(R2((s@/usr/lib/python2.7/site-packages/ansible/modules/system/runit.pytreloadedscC`s|j|jd|jgS(NRL(R;R+R(R2((s@/usr/lib/python2.7/site-packages/ansible/modules/system/runit.pyRLscC`s |jS(N(trestart(R2((s@/usr/lib/python2.7/site-packages/ansible/modules/system/runit.pyt restartedscC`s|j|jd|jgS(NRN(R;R+R(R2((s@/usr/lib/python2.7/site-packages/ansible/modules/system/runit.pyRNscC`s |jS(N(tkill(R2((s@/usr/lib/python2.7/site-packages/ansible/modules/system/runit.pytkilledscC`s|j|jd|jgS(Ns force-stop(R;R+R(R2((s@/usr/lib/python2.7/site-packages/ansible/modules/system/runit.pyRPscC`shy(|jjdj|\}}}Wn0tk rZ}|jjddt|nX|||fS(Nt R4sfailed to execute: %s(R t run_commandR-t ExceptionR8R (R2tcmdRDRERFR9((s@/usr/lib/python2.7/site-packages/ansible/modules/system/runit.pyR;s (!cC`s9|ji}x"|jD]}|j|||RIR&RJRKRMRLRORNRQRPR;RY(((s@/usr/lib/python2.7/site-packages/ansible/modules/system/runit.pyRts$               cC`stdtdtdddtdtddddd d d d d gdtdddtdddddtdddddtdddddt}tdddddddd|_|jd}|jd}t|}t}|j}|dk r||j krt}|j sy!|r>|j n |j Wqt tfk r~}|jddt|qXqn|dk r||jkrt}|j st||qn|jd|d |jdS(!Nt argument_specRttypetstrR$RtchoicesRQRKRMROR>R&RtbooltdisttdefaulttrunitR s /var/serviceR!s/etc/svtsupports_check_modetLANGtCtLC_ALLt LC_MESSAGEStLC_CTYPER4s!Could not change service link: %stchangedR"(RtdictR*trun_command_environ_updateR RtFalseRYR Rt check_modeR:R=R7tIOErrorR8R Rtgetattrt exit_json(R RRR"Rkt orig_stateR9((s@/usr/lib/python2.7/site-packages/ansible/modules/system/runit.pytmains:' $      $ t__main__(t __future__RRRR^t __metaclass__tANSIBLE_METADATAt DOCUMENTATIONtEXAMPLESR.RAtansible.module_utils.basicRtansible.module_utils._textR RtobjectRRtRZ(((s@/usr/lib/python2.7/site-packages/ansible/modules/system/runit.pyts   +!    )