Stats access requires custom password
This commit is contained in:
parent
8afffcebd5
commit
f283cb7131
2 changed files with 10 additions and 10 deletions
6
swarm.py
6
swarm.py
|
|
@ -12,11 +12,11 @@ result = {
|
|||
"easymapping": [],
|
||||
"customerrors": True if os.getenv("HAPROXY_CUSTOMERRORS") == "true" else False
|
||||
}
|
||||
if os.getenv("HAPROXY_USERNAME"):
|
||||
if os.getenv("HAPROXY_PASSWORD"):
|
||||
result["stats"] = {
|
||||
"username": os.getenv("HAPROXY_USERNAME"),
|
||||
"username": os.getenv("HAPROXY_USERNAME") if os.getenv("HAPROXY_USERNAME") else "admin",
|
||||
"password": os.getenv("HAPROXY_PASSWORD"),
|
||||
"port": os.getenv("HAPROXY_STATS_PORT"),
|
||||
"port": os.getenv("HAPROXY_STATS_PORT") if os.getenv("HAPROXY_STATS_PORT") else "1936",
|
||||
}
|
||||
|
||||
for line in lineList:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue