Let's look into the modules' code:
Inside def main():
:
# Find service management tools
service.get_service_tools()
Then to class LinuxService(Service):
and to 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've cut some code, but this snippet should answer your question: what system Ansible is likely to choose if there are many.
Systemd is the first one to search, then upstart, etc...