??????????????
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 Zd Z dd l Z dd l m Z dd l mZddlmZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zedkrþeƒnd S(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust communityt supported_bys] --- module: nosh author: - "Thomas Caravia (@tacatac)" version_added: "2.5" short_description: Manage services with nosh description: - Control running and enabled state for system-wide or user services. - BSD and Linux systems are supported. options: name: required: true description: - Name of the service to manage. state: required: false choices: [ started, stopped, reset, restarted, reloaded ] description: - C(started)/C(stopped) are idempotent actions that will not run commands unless necessary. C(restarted) will always bounce the service. C(reloaded) will send a SIGHUP or start the service. C(reset) will start or stop the service according to whether it is enabled or not. enabled: required: false type: bool description: - Enable or disable the service, independently of C(*.preset) file preference or running state. Mutually exclusive with I(preset). Will take effect prior to I(state=reset). preset: required: false type: bool description: - Enable or disable the service according to local preferences in *.preset files. Mutually exclusive with I(enabled). Only has an effect if set to true. Will take effect prior to I(state=reset). user: required: false default: 'no' type: bool description: - Run system-control talking to the calling user's service manager, rather than the system-wide service manager. requirements: - A system with an active nosh service manager, see Notes for further information. notes: - Information on the nosh utilities suite may be found at U(https://jdebp.eu/Softwares/nosh/). s— - name: start dnscache if not running nosh: name=dnscache state=started - name: stop mpd, if running nosh: name=mpd state=stopped - name: restart unbound or start it if not already running nosh: name: unbound state: restarted - name: reload fail2ban or start it if not already running nosh: name: fail2ban state: reloaded - name: disable nsd nosh: name=nsd enabled=no - name: for package installers, set nginx running state according to local enable settings, preset and reset nosh: name=nginx preset=True state=reset - name: reboot the host if nosh is the system manager, would need a "wait_for*" task at least, not recommended as-is nosh: name=reboot state=started - name: using conditionals with the module facts tasks: - name: obtain information on tinydns service nosh: name=tinydns register: result - name: fail if service not loaded fail: msg="The {{ result.name }} service is not loaded" when: not result.status - name: fail if service is running fail: msg="The {{ result.name }} service is running" when: result.status and result.status['DaemontoolsEncoreState'] == "running" sì name: description: name used to find the service returned: success type: str sample: "sshd" service_path: description: resolved path for the service returned: success type: str sample: "/var/sv/sshd" enabled: description: whether the service is enabled at system bootstrap returned: success type: bool sample: True preset: description: whether the enabled status reflects the one set in the relevant C(*.preset) file returned: success type: bool sample: 'False' state: description: service process run state, C(None) if the service is not loaded and will not be started returned: if state option is used type: str sample: "reloaded" status: description: a dictionary with the key=value pairs returned by `system-control show-json` or C(None) if the service is not loaded returned: success type: complex contains: After: returned: success type: list sample: ["/etc/service-bundles/targets/basic","../sshdgenkeys", "log"] Before: returned: success type: list sample: ["/etc/service-bundles/targets/shutdown"] Conflicts: returned: success type: list sample: '[]' DaemontoolsEncoreState: returned: success type: str sample: "running" DaemontoolsState: returned: success type: str sample: "up" Enabled: returned: success type: bool sample: True LogService: returned: success type: str sample: "../cyclog@sshd" MainPID: returned: success type: int sample: 661 Paused: returned: success type: bool sample: 'False' ReadyAfterRun: returned: success type: bool sample: 'False' RemainAfterExit: returned: success type: bool sample: 'False' Required-By: returned: success type: list sample: '[]' RestartExitStatusCode: returned: success type: int sample: '0' RestartExitStatusNumber: returned: success type: int sample: '0' RestartTimestamp: returned: success type: int sample: 4611686019935648081 RestartUTCTimestamp: returned: success type: int sample: 1508260140 RunExitStatusCode: returned: success type: int sample: '0' RunExitStatusNumber: returned: success type: int sample: '0' RunTimestamp: returned: success type: int sample: 4611686019935648081 RunUTCTimestamp: returned: success type: int sample: 1508260140 StartExitStatusCode: returned: success type: int sample: 1 StartExitStatusNumber: returned: success type: int sample: '0' StartTimestamp: returned: success type: int sample: 4611686019935648081 StartUTCTimestamp: returned: success type: int sample: 1508260140 StopExitStatusCode: returned: success type: int sample: '0' StopExitStatusNumber: returned: success type: int sample: '0' StopTimestamp: returned: success type: int sample: 4611686019935648081 StopUTCTimestamp: returned: success type: int sample: 1508260140 Stopped-By: returned: success type: list sample: ["/etc/service-bundles/targets/shutdown"] Timestamp: returned: success type: int sample: 4611686019935648081 UTCTimestamp: returned: success type: int sample: 1508260140 Want: returned: success type: str sample: "nothing" Wanted-By: returned: success type: list sample: ["/etc/service-bundles/targets/server","/etc/service-bundles/targets/sockets"] Wants: returned: success type: list sample: ["/etc/service-bundles/targets/basic","../sshdgenkeys"] user: description: whether the user-level service manager is called returned: success type: bool sample: False N(t AnsibleModule(tfail_if_missing(t to_nativecC`sF|jddtƒg}|jdr5|dg}n|j||ƒS(Nssystem-controltrequiredtusers--user(t get_bin_pathtTruetparamst run_command(tmoduletargstsys_ctl((s?/usr/lib/python2.7/site-packages/ansible/modules/system/nosh.pyt run_sys_ctl"s cC`sWt|d|gƒ\}}}|dkrCt|t|ddƒnt|ƒjƒSdS(Ntfinditmsgthost(RR tFalseR tstrip(Rtservicetrctoutterr((s?/usr/lib/python2.7/site-packages/ansible/modules/system/nosh.pytget_service_path)s cC`s(t|d|gƒ\}}}|dkS(Ns is-enabledi(R(Rt service_pathRRR((s?/usr/lib/python2.7/site-packages/ansible/modules/system/nosh.pytservice_is_enabled2scC`s:t|dd|gƒ\}}}t|ƒjƒjdƒS(Ntpresets --dry-runtenable(RR Rt startswith(RRRRR((s?/usr/lib/python2.7/site-packages/ansible/modules/system/nosh.pytservice_is_preset_enabled7s!cC`s(t|d|gƒ\}}}|dkS(Ns is-loadedi(R(RRRRR((s?/usr/lib/python2.7/site-packages/ansible/modules/system/nosh.pytservice_is_loaded<scC`spt|d|gƒ\}}}|dk rC|rC|jd|ƒn)tjt|ƒjƒƒ}||}|SdS(Ns show-jsonR(RtNonet fail_jsontjsontloadsR R(RRRRRtjson_outR((s?/usr/lib/python2.7/site-packages/ansible/modules/system/nosh.pytget_service_statusAs  cC`s|dtdddgƒkS(NtDaemontoolsEncoreStatetstartingtstartedtrunning(tset(tservice_status((s?/usr/lib/python2.7/site-packages/ansible/modules/system/nosh.pytservice_is_runningLsc C`s€|d}|d}|jdrºd}||jdkrºt|d<|jsžt|||gƒ\}}}|dkrž|jdd||||fƒqžn| |d<| |dd}d|dR;R<ttypetstrR3tboolR!R tdefaulttsupports_check_modetmutually_exclusiveitR4RR(RtdictRRRR&RR R$R9RCR%R+t exit_json(RRRRRR7R((s?/usr/lib/python2.7/site-packages/ansible/modules/system/nosh.pytmainËs8$     t__main__(t __future__RRRRGt __metaclass__tANSIBLE_METADATAt DOCUMENTATIONtEXAMPLEStRETURNR(tansible.module_utils.basicRtansible.module_utils.serviceR tansible.module_utils._textR RRR R$R%R+R2R9RCRPt__name__(((s?/usr/lib/python2.7/site-packages/ansible/modules/system/nosh.pyts.   4)®       . M .