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

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:

主站蜘蛛池模板: 抚顺市| 射阳县| 长春市| 汉寿县| 浦江县| 和顺县| 四川省| 平遥县| 马山县| 永吉县| 金寨县| 中卫市| 武平县| 洛川县| 常熟市| 泸州市| 陵水| 嘉黎县| 页游| 桐乡市| 诸城市| 连平县| 遵义县| 尼木县| 阳山县| 南安市| 巴林右旗| 梅河口市| 中西区| 平陆县| 精河县| 丹寨县| 阳高县| 临猗县| 渭南市| 沐川县| 林口县| 平定县| 惠州市| 濮阳市| 鸡泽县|