mirror of
https://github.com/ansible/awx.git
synced 2026-01-15 03:40:42 -03:30
fix 2nd instance of in-line conditional for RHEL5 scan issue
This commit is contained in:
parent
0afe60fb5f
commit
3c8456d77f
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user