From ed99d1eb1591dba04f7b77cad2f103a42b0f1c3e Mon Sep 17 00:00:00 2001 From: AlanCoding Date: Tue, 19 Jan 2016 12:45:16 -0500 Subject: [PATCH] fix 2nd instance of in-line conditional for RHEL5 scan issue --- awx/plugins/library/scan_services.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/awx/plugins/library/scan_services.py b/awx/plugins/library/scan_services.py index accbd232b4..a786b791bf 100644 --- a/awx/plugins/library/scan_services.py +++ b/awx/plugins/library/scan_services.py @@ -149,8 +149,12 @@ class SystemctlScanService(BaseService): line_data = line.split() if len(line_data) != 2: continue + if line_data[1] == "enabled": + state_val = "running" + else: + state_val = "stopped" services.append({"name": line_data[0], - "state": "running" if line_data[1] == "enabled" else "stopped", + "state": state_val, "source": "systemd"}) return services