From 6a620a1ed9c9033154ff1562f98b1e559b4ce47a Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Tue, 19 Jun 2018 08:33:20 -0500 Subject: [PATCH] add notes to service_facts about accessing fact data (#41608) * add notes to service_facts about accessing fact data Signed-off-by: Adam Miller * remove unquoted : Signed-off-by: Adam Miller --- lib/ansible/modules/system/service_facts.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/ansible/modules/system/service_facts.py b/lib/ansible/modules/system/service_facts.py index b884daff7e..e5e06980f3 100644 --- a/lib/ansible/modules/system/service_facts.py +++ b/lib/ansible/modules/system/service_facts.py @@ -22,6 +22,15 @@ description: version_added: "2.5" requirements: ["Any of the following supported init systems: systemd, sysv, upstart"] +notes: + - When accessing the C(ansible_facts.services) facts collected by this module, + it is recommended to not use "dot notation" because services can have a C(-) + character in their name which would result in invalid "dot notation", such as + C(ansible_facts.services.zuul-gateway). It is instead recommended to + using the string value of the service name as the key in order to obtain + the fact data value like C(ansible_facts.services['zuul-gateway']) + + author: - Matthew Jones - Adam Miller (@maxamillion)