File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/roles/configuration_checks/tasks/files Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -209,10 +209,10 @@ checks:
209209 nic=$(basename "$nic_id")
210210 az network nic show --resource-group {{ CONTEXT.resource_group_name }} --name "$nic" \
211211 --query "ipConfigurations[].{IP:privateIPAddress, Primary:primary}" -o tsv |
212- while IFS=$'\t' read -r ip is_primary ; do
213- # normalize: trim spaces/CR and lowercase
214- norm =$(echo "$is_primary" | tr -d '\r\t ' | tr '[:upper:]' '[:lower:]')
215- if [ "$norm " = "true" ]; then
212+ while read -r line ; do
213+ ip=$(echo "$line" | awk '{print $1}')
214+ is_primary =$(echo "$line" | awk '{print $2}' | tr -d '\r\t ' | tr '[:upper:]' '[:lower:]')
215+ if [ "$is_primary " = "true" ]; then
216216 echo "$nic: $ip Primary"
217217 else
218218 echo "$nic: $ip Secondary"
You can’t perform that action at this time.
0 commit comments