September 2018
Beginner to intermediate
214 pages
5h 53m
English
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:

Read now
Unlock full access