Skip to content

Commit e4ae0d7

Browse files
committed
Suggested comment fix
1 parent 7d49596 commit e4ae0d7

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

main.tf

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,13 @@ locals {
3939
})
4040

4141
# "16.0.3" -> ["16", "0", "3"]
42-
runner_version_split = split(".", var.runner_gitlab.runner_version)
42+
runner_version_split = split(".", var.runner_gitlab.runner_version)
4343
# ["16", "0", "3"] -> 16
44-
runner_version_major = parseint(local.runner_version_split[0], 10)
44+
runner_version_major = parseint(local.runner_version_split[0], 10)
4545
# ["16", "0", "3"] -> 0
46-
runner_version_minor = parseint(local.runner_version_split[1], 10)
47-
# https://docs.gitlab.com/runner/executors/docker_autoscaler/#example-aws-autoscaling-for-1-job-per-instance
48-
# GitLab 16.10 and earlier, manually install the plugin
49-
# GitLab 16.11 and later, done through `gitlab runner fleeting install`
50-
runner_use_new_fleeting_install = local.runner_version_major >= 16 && local.runner_version_minor >= 11
46+
runner_version_minor = parseint(local.runner_version_split[1], 10)
47+
# the `gitlab-runner fleeting install` command was introduced in 16.11
48+
runner_use_new_fleeting_install = (local.runner_version_major == 16 && local.runner_version_minor >= 11) || local.runner_version_major > 16
5149

5250
file_yum_update = file("${path.module}/template/yum_update.tftpl")
5351

0 commit comments

Comments
 (0)