Sort Controllers in Ansible Inventory file

Controller Group will now be sorted.

Change-Id: I3068943dd8607baf34bb76f67c28b873a3e19b13
This commit is contained in:
akrzos 2017-08-22 10:48:46 -04:00
parent 694e8346e6
commit 8f8eeabe66

View File

@ -222,6 +222,13 @@ elif grep -q $uuid <<< {$blockstorage_uuids}; then
echo " UserKnownHostsFile=/dev/null" | tee -a ${ssh_config_file}
done
# Sort Controllers
controller_hn=( $(
for item in "${controller_hn[@]}"
do
echo "$item"
done | sort) )
echo ""
echo "---------------------------"
echo "Creating ansible inventory file:"