Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sd109 committed Nov 6, 2024
1 parent 9ad8abc commit fb98ab4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bin/seed-ssh
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,14 @@ fi
work_dir="$(ansible_variable work_directory)/seed-ssh"
mkdir -p "$work_dir"

# If -q (quiet) is passed to ssh then also suppress terraform / tofu output
# Check if quiet mode (-q) was passed to SSH command
# so that we can suppress other output elsewhere too
QUIET_MODE=false
for arg in $@; do
if [[ ! $arg == -* ]]; then
# Break if we encounter a non-flag arg since
# this is likely a command to run within the SSH
# session instead of an arg intended for SSH client
break
elif [[ $arg == "-q" ]]; then
QUIET_MODE=true
Expand All @@ -78,6 +82,7 @@ terraform {
backend "${terraform_backend_type}" {}
}
EOF
# If -q (quiet) is passed to ssh then also suppress terraform / tofu output
if [[ $QUIET_MODE == "true" ]]; then
tf_init > /dev/null
else
Expand Down

0 comments on commit fb98ab4

Please sign in to comment.