Also protected against OS env vars in expand-groups

If we unset these in the script, it will protect us further.

Change-Id: Ic7370411df3742d1d76be08fda68cf701458e87c
This commit is contained in:
Monty Taylor 2016-03-22 19:34:17 -05:00
parent 453051aafb
commit 4b8b02bc7a

View File

@ -20,6 +20,10 @@ trap "rm -rf $outdir" EXIT
outfile=$outdir/generated-groups
echo "# This file is autogenerated" > $outfile
# Protect against leaky environment settings
unset OS_CLOUD
unset OS_REGION_NAME
IFS=$'\n'
for line in $(</etc/ansible/groups.txt); do
name=$(echo $line | cut -f1 -d' ')