filter hosts

This commit is contained in:
oliver committed 2026-10-13 13:24:58 -03:00
1 parent ac65ba2169
commit 9abed9f2e9
3 files changed
+13 -3

No files matched your search

+6 -1
View File
@@ -21,7 +21,12 @@ case "$remotefile" in
esac
# Read hosts from file descriptor 3 to prevent ssh from consuming stdin
while read -r host <&3; do
while read -r host <&3 || [ -n "$host" ]; do
# Strip comments (# ...) and surrounding whitespace; skip empty lines
host="${host%%#*}"
host="${host//[[:space:]]/}"
[ -z "$host" ] && continue
host_env_file="$host_vars_dir/$host/$host.env"
if [ ! -f "$host_env_file" ]; then