官术网_书友最值得收藏!

The systemd module

For more advanced service management, we can use systemd as an alternative to service. The systemd module should be able to manage services on all Linux operating systems because it has the advantage of having a status special return value containing a lot of useful service data. An example playbook of how to use it is shown here:

    - name: start and enable ntp service using systemd
systemd:
name: ntp
state: started
enabled: yes
masked: no
daemon_reload: yes
register: systemd

- debug:
var: systemd.status.Description

The playbook output should look as follows:

主站蜘蛛池模板: 永吉县| 洪泽县| 阜阳市| 鄂州市| 连山| 吉水县| 赤峰市| 广水市| 营山县| 高淳县| 灵寿县| 曲松县| 和龙市| 衡南县| 元阳县| 黔南| 河间市| 蛟河市| 图们市| 景洪市| 西安市| 民勤县| 华阴市| 察雅县| 遂宁市| 甘洛县| 错那县| 太康县| 普宁市| 丹寨县| 固始县| 祁东县| 文成县| 平陆县| 微山县| 左权县| 绥江县| 星子县| 康平县| 潮州市| 城市|