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:
parent
6c0af3ebd9
commit
ed99d1eb15
@ -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…
Reference in New Issue
Block a user