From 02b63c473221a01edfb2dc53d3bebd8d6c7e4bd7 Mon Sep 17 00:00:00 2001 From: Risto Oikarinen Date: Thu, 1 Nov 2018 06:40:58 +0200 Subject: [PATCH] Make service_facts return value documentation visible (#47701) (cherry picked from commit 276634c808341a48c3f333da6f37cd554a9b7039) --- lib/ansible/modules/system/service_facts.py | 34 +++++++++++++-------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/lib/ansible/modules/system/service_facts.py b/lib/ansible/modules/system/service_facts.py index ccfc0aa323..8f6d0c7ff3 100644 --- a/lib/ansible/modules/system/service_facts.py +++ b/lib/ansible/modules/system/service_facts.py @@ -47,22 +47,30 @@ EXAMPLES = ''' RETURN = ''' ansible_facts: - description: facts to add to ansible_facts about the services on the system + description: Facts to add to ansible_facts about the services on the system returned: always type: complex contains: - "services": { - "network": { - "source": "sysv", - "state": "running", - "name": "network" - }, - arp-ethers.service: { - "source": "systemd", - "state": "stopped", - "name": "arp-ethers.service" - } - } + services: + description: States of the services with service name as key. + returned: always + type: complex + contains: + source: + description: Init system of the service. One of C(systemd), C(sysv), C(upstart). + returned: always + type: string + sample: sysv + state: + description: State of the service. Either C(running) or C(stopped). + returned: always + type: string + sample: running + name: + description: Name of the service. + returned: always + type: string + sample: arp-ethers.service '''