filter hosts
This commit is contained in:
1 parent
ac65ba2169
commit
9abed9f2e9
3 files changed
+13
-3
No files matched your search
+6
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user