1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 23:51:09 +03:00

fix 2nd instance of in-line conditional for RHEL5 scan issue

This commit is contained in:
AlanCoding 2016-01-19 12:45:16 -05:00 committed by Matthew Jones
parent 6c0af3ebd9
commit ed99d1eb15

View File

@ -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