Skip to content

Role fails when gitlab_runner_package_version is not defined #377

@DrPsychick

Description

@DrPsychick

Hello,

I get an error when gitlab_runner_package_version is not defined, although it should just install "latest" in this case, if I'm not mistaken.

gitlab-runner: fatal: [default]: FAILED! => {"msg": "The conditional check 'gitlab_runner_package_version is undefined or gitlab_runner_package_version is version('17.7.0', '>=')' failed. The error was: Input version value cannot be empty\n\nThe error appears to be in '/home/packer/.ansible/roles/riemers.gitlab-runner/tasks/install-debian.yml': line 55, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: (Debian) Install GitLab Runner Helpers\n  ^ here\n"}

gitlab_runner_package_version is undefined or gitlab_runner_package_version is version('17.7.0', '>=') seems to not return early and tries to evaluate the second part as well.

Environment: Ubuntu 24.04
Ansible: 2.18
gitlab-runner (role): 2.0.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions