From 9c9ea1c0fb098977422b1c32806f4ee334c45d64 Mon Sep 17 00:00:00 2001 From: Sumit Jaiswal Date: Mon, 29 Apr 2024 06:41:09 +0530 Subject: [PATCH] pass ARI config path as env var (#228) Signed-off-by: Sumit Jaiswal --- ansible_risk_insight/scanner.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ansible_risk_insight/scanner.py b/ansible_risk_insight/scanner.py index 2e3fb512..a2dfe032 100644 --- a/ansible_risk_insight/scanner.py +++ b/ansible_risk_insight/scanner.py @@ -60,8 +60,11 @@ equal, ) - -default_config_path = os.path.expanduser("~/.ari/config") +ARI_CONFIG_PATH = os.getenv("ARI_CONFIG_PATH") +if ARI_CONFIG_PATH: + default_config_path = ARI_CONFIG_PATH +else: + default_config_path = os.path.expanduser("~/.ari/config") default_data_dir = os.path.join("/tmp", "ari-data") default_rules_dir = os.path.join(os.path.dirname(__file__), "rules") default_log_level = "info"