From 27494d631accbc717556dbce2970eddb49abca0e Mon Sep 17 00:00:00 2001 From: Aidaho Date: Sat, 18 May 2024 13:47:53 +0300 Subject: [PATCH] v7.2.5.0: Update ansible_status with dynamic service name In the install/routes.py, the 'run_ansible' method call in the 'install' function has been updated to dynamically pass the 'service' name, resulting in a more flexible and adaptable code. Previously, it was hardcoded to run only the 'waf_service', which limited its usage. --- app/routes/install/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/routes/install/routes.py b/app/routes/install/routes.py index 3e3d3f25..d728d066 100644 --- a/app/routes/install/routes.py +++ b/app/routes/install/routes.py @@ -92,7 +92,7 @@ def install_waf(service, server_ip): except Exception as e: return f'error: Cannot create inventory: {e}' try: - ansible_status = service_mod.run_ansible(inv, server_ips, f'waf_service'), 201 + ansible_status = service_mod.run_ansible(inv, server_ips, f'waf_{service}'), 201 except Exception as e: return f'error: Cannot install WAF: {e}'