From ee7e812c0a1c7d492efb141648e58200266358f9 Mon Sep 17 00:00:00 2001
From: ale <ale@incal.net>
Date: Tue, 17 Dec 2024 10:57:59 +0000
Subject: [PATCH] Set a regex for run-parts

---
 roles/float-base/files/run-node-exporter-scripts.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/roles/float-base/files/run-node-exporter-scripts.sh b/roles/float-base/files/run-node-exporter-scripts.sh
index 9b9d977b..5ba11ebd 100644
--- a/roles/float-base/files/run-node-exporter-scripts.sh
+++ b/roles/float-base/files/run-node-exporter-scripts.sh
@@ -15,7 +15,7 @@ trap "rm -f ${tmp_file} 2>/dev/null" EXIT INT TERM
 exit_status=0
 
 # Run each node-exporter script, with a 120s timeout, in sequence.
-for script in $(run-parts --list "${scripts_dir}"); do
+for script in $(run-parts --regex='^[a-z0-9].*' --list "${scripts_dir}"); do
     script_basename=$(basename "${script}")
     script_name="${script_basename%.*}"
     output_file="${output_dir}/${script_name}.prom"
-- 
GitLab