In Ansible, what's the diffence between the service and the systemd modules?

segolas.zoso picture segolas.zoso · May 15, 2017 · Viewed 9.3k times · Source

In Ansible, what is the difference between the service and the systemd modules? The service module seems to include the systemd module so what's the point of having systemd by itself?

Answer

Ortomala Lokni picture Ortomala Lokni · May 21, 2017

The module service is a generic one. According to the Ansible documentation :

Supported init systems include BSD init, OpenRC, SysV, Solaris SMF, systemd, upstart.

The module systemd is available only from Ansible 2.2 and is dedicated to systemd.

According to the developers of Ansible :

we are moving away from having everything in a monolithic 'service' module and splitting into specific modules, following the same model the 'package' module has.