mirror of
https://github.com/ansible/awx.git
synced 2026-03-10 22:19:28 -02:30
fix 2nd instance of in-line conditional for RHEL5 scan issue
This commit is contained in:
@@ -149,8 +149,12 @@ class SystemctlScanService(BaseService):
|
|||||||
line_data = line.split()
|
line_data = line.split()
|
||||||
if len(line_data) != 2:
|
if len(line_data) != 2:
|
||||||
continue
|
continue
|
||||||
|
if line_data[1] == "enabled":
|
||||||
|
state_val = "running"
|
||||||
|
else:
|
||||||
|
state_val = "stopped"
|
||||||
services.append({"name": line_data[0],
|
services.append({"name": line_data[0],
|
||||||
"state": "running" if line_data[1] == "enabled" else "stopped",
|
"state": state_val,
|
||||||
"source": "systemd"})
|
"source": "systemd"})
|
||||||
return services
|
return services
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user