Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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?

like image 304
segolas.zoso Avatar asked May 15 '17 07:05

segolas.zoso


People also ask

What is SystemD module in ansible?

Ansible SystemD module helps to control the systemd units such as services and timers created on the Linux server. SystemD is a daemon that manages the services and timer units on the Linux system and we mostly interact with it using the following ways. service file. systemctl command. journalctl command.

What is service module in ansible?

What does the Ansible service module do? Ansible's service module controls services on remote hosts and is useful for these common tasks: Start, stop or restart a service on a remote host.

What are the different modules in ansible?

These are firewalls, load balancers, containers themselves, container orchestrators, AWS, Azure, OpenStack, private cloud, and security configuration. There are some top ansible modules that are frequently used to automate different tasks.

What is difference between ansible Plugin and Module?

Modules execute on the target system (usually that means on a remote system) in separate processes. Plugins augment Ansible's core functionality and execute on the control node within the /usr/bin/ansible process.


1 Answers

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.

like image 52
Ortomala Lokni Avatar answered Sep 24 '22 06:09

Ortomala Lokni