philips-labs / terraform-aws-github-runner

Terraform module for scalable GitHub action runners on AWS
https://philips-labs.github.io/terraform-aws-github-runner/
MIT License
2.62k stars 627 forks source link

ubuntu noble 24.04 fails due to regex #4245

Open bdellegrazie opened 2 weeks ago

bdellegrazie commented 2 weeks ago

Hi,

When testing with Ubuntu 24.04 the nodes fail to install the runner due to the following line: https://github.com/philips-labs/terraform-aws-github-runner/blob/52ce9c15f68849c2aaf34e2bdec4b6f913d2c06d/modules/runners/templates/install-runner.sh#L45

Specifically, the condition:

os_id=$(awk -F= '/^ID/{print $2}' /etc/os-release)

On Ubuntu 24.04, the source file (/etc/os-release) looks something like:

ID=ubuntu
ID_LIKE=debian

which results in os_id having a value of:

ubuntu
debian

The correct expression is simply:

os_id=$(awk -F= '/^ID=/{print $2}' /etc/os-release)

I'll raise a PR.

ay0o commented 2 weeks ago

Related to #4178