We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b3fb317 commit a86482eCopy full SHA for a86482e
bin/user_data.sh
@@ -43,7 +43,7 @@ runcmd:
43
GALAXY_VALUES_FILES_LIST=$(curl -s -f "http://metadata.google.internal/computeMetadata/v1/instance/attributes/galaxy-values-files" -H "Metadata-Flavor: Google" 2>/dev/null || echo "values/values.yml")
44
45
# Convert semicolon-separated values files to JSON array for Ansible
46
- GALAXY_VALUES_FILES_JSON=$(echo "$GALAXY_VALUES_FILES_LIST" | awk -F';' '"'"'{printf "["; for(i=1; i<=NF; i++) {if(i>1) printf ","; printf "\"%s\"", $i} printf "]"}'"'"')
+ GALAXY_VALUES_FILES_JSON=$(echo "$GALAXY_VALUES_FILES_LIST" | sed -e 's/;/","/g' -e 's/^/["/' -e 's/$/"]/')
47
48
mkdir -p /tmp/ansible-inventory
49
cat > /tmp/ansible-inventory/localhost << EOF
0 commit comments