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

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:

主站蜘蛛池模板: 嘉鱼县| 洛宁县| 元朗区| 伊宁市| 霍州市| 天等县| 潼南县| 仪陇县| 格尔木市| 酉阳| 肃北| 丰原市| 富蕴县| 广水市| 社旗县| 磐石市| 巍山| 信丰县| 驻马店市| 三河市| 江达县| 大荔县| 浠水县| 习水县| 大余县| 资兴市| 化德县| 华安县| 旺苍县| 闽侯县| 武鸣县| 太谷县| 茂名市| 手游| 惠州市| 简阳市| 中方县| 溧水县| 浠水县| 诏安县| 会同县|