diff --git a/terraform-aws-github-runner/modules/runners-instances/templates/user-data.sh b/terraform-aws-github-runner/modules/runners-instances/templates/user-data.sh index 0f03ca6902..0716f89ac9 100644 --- a/terraform-aws-github-runner/modules/runners-instances/templates/user-data.sh +++ b/terraform-aws-github-runner/modules/runners-instances/templates/user-data.sh @@ -138,6 +138,10 @@ fi ${post_install} +# Cleanup any existing swapfile just to be sure +sudo swapoff /swapfile +sudo rm /swapfile +# before allocating a new one sudo fallocate -l 3G /swapfile sudo chmod 600 /swapfile sudo mkswap /swapfile