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

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:

主站蜘蛛池模板: 敦煌市| 承德市| 阳朔县| 昌邑市| 双江| 永泰县| 张北县| 文昌市| 惠来县| 澄江县| 长泰县| 雷山县| 拜城县| 清苑县| 板桥市| 万山特区| 木里| 临猗县| 剑川县| 宜州市| 福安市| 侯马市| 贵德县| 广元市| 新干县| 色达县| 荆州市| 壶关县| 湟中县| 寿光市| 江城| 九寨沟县| 鄂尔多斯市| 双江| 武夷山市| 宾川县| 延庆县| 阳东县| 湖州市| 马尔康县| 沅江市|