Take a look at the code modules:
Inside def main(): ::
Then to class LinuxService(Service): and def get_service_tools(self):
# Locate a tool to enable/disable a service if check_systemd(): # service is managed by systemd ... elif location.get('initctl', False) and os.path.exists("/etc/init/%s.conf" % self.name): # service is managed by upstart ... elif location.get('rc-service', False): # service is managed by OpenRC ... elif self.svc_initscript: # service is managed by with SysV init scripts ...
I cut some code, but this snippet should answer your question: which Ansible system can choose if there are a lot of them.
Systemd is the first to search, then pop up, etc.
source share