From 2a247391ab781e339a97f454ea93ea6cf4d0a5f8 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Tue, 18 May 2021 03:37:39 +0000 Subject: [PATCH] aws: Shorten the tag names. --- tools/setup/install-aws-server | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/setup/install-aws-server b/tools/setup/install-aws-server index e7c693e1cb..91f388af06 100755 --- a/tools/setup/install-aws-server +++ b/tools/setup/install-aws-server @@ -74,7 +74,8 @@ BOOTDATA=$(mktemp) sed '/^AWS=/ r ./bootstrap-awscli' bootstrap-aws-installer } >>"$BOOTDATA" -TAGS="[{Key=Name,Value=$SERVER},{Key=role,Value=\"$ROLES\"}]" +TAG_ROLE_NAMES=$(echo "$ROLES" | perl -pe 's/\w+::profile::(\w+)/$1/g') +TAGS="[{Key=Name,Value=$SERVER},{Key=role,Value=\"$TAG_ROLE_NAMES\"}]" INSTANCE_DATA=$($AWS ec2 run-instances \ --iam-instance-profile 'Name="EC2ProdInstance"' \ --image-id "$AMI_ID" \