Skip to content

Commit 9f4b3be

Browse files
committed
Remove more error handling linting
1 parent 7872c89 commit 9f4b3be

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packer/linux/conf/docker/cron.hourly/docker-low-disk-gc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ mark_instance_unhealthy() {
1414
# mark the instance for termination
1515
echo "Marking instance as unhealthy"
1616

17+
# shellcheck disable=SC2155
1718
local token=$(curl -X PUT -H "X-aws-ec2-metadata-token-ttl-seconds: 60" --fail --silent --show-error --location "http://169.254.169.254/latest/api/token")
19+
# shellcheck disable=SC2155
1820
local instance_id=$(curl -H "X-aws-ec2-metadata-token: $token" --fail --silent --show-error --location "http://169.254.169.254/latest/meta-data/instance-id")
21+
# shellcheck disable=SC2155
1922
local region=$(curl -H "X-aws-ec2-metadata-token: $token" --fail --silent --show-error --location "http://169.254.169.254/latest/meta-data/placement/region")
2023

2124
aws autoscaling set-instance-health \

0 commit comments

Comments
 (0)