Documentation

service_facts - Return service state information as fact data

New in version 2.5.

Synopsis

  • Return service state information as fact data for various service management utilities

Requirements

The below requirements are needed on the host that executes this module.

  • Any of the following supported init systems: systemd, sysv, upstart

Examples

- name: populate service facts
  service_facts:

- debug:
    var: ansible_facts.services

Returned Facts

Facts returned by this module are added/updated in the hostvars host facts and can be referenced by name just like any other host fact. They do not need to be registered in order to use them.

Fact
Returned
Description
services



Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

Author

  • Matthew Jones
  • Adam Miller (@maxamillion)

Hint

If you notice any issues in this documentation you can edit this document to improve it.