Skip to content

Instantly share code, notes, and snippets.

@bastichelaar
Created May 4, 2015 08:54
Show Gist options
  • Save bastichelaar/f69459a3355c7b743cf5 to your computer and use it in GitHub Desktop.
Save bastichelaar/f69459a3355c7b743cf5 to your computer and use it in GitHub Desktop.
diff --git a/ansible/templates/retrieve_security_groups.sh.j2 b/ansible/templates/retrieve_security_groups.sh.j2
index 7265ede..695aa6e 100755
--- a/ansible/templates/retrieve_security_groups.sh.j2
+++ b/ansible/templates/retrieve_security_groups.sh.j2
@@ -10,7 +10,7 @@ do
get_group="cat /tmp/$$.json | jq '.SecurityGroups[] | select(.GroupName==$groupname) | .GroupId'"
groupid=`eval $get_group`
varname=`echo $groupname| tr " " "_"| tr "-" "_" | tr -d \"`
- echo ${varname}_group: $groupid
+ echo ${varname}_group: '{ "group_id": "$groupid" }'
done
rm /tmp/$$.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment