ansible-gitlab-runner
ansible-gitlab-runner copied to clipboard
Unspecified runner is added instead of updating existing one
After updating this role today, an additional runner has been installed which I have not defined.
The vars say:
runner_name: hiccup-notebook
gitlab_runner_runners:
- name: '{{ runner_name }}'
tags:
- python3
- host-iron
executor: shell
The runner hiccup-notebook had previously been installed with gitlab-runner v1.2.3. Today I am trying to update it to the latest version and have subsequently updated gitlab-runner to v1.6.17.
After running the playbook I see in Gitlab are two runners on the same host:
-
hiccup-notebook on version 12.10.1 with tags
python3
andhost-iron
- lxc-gitlab-runner-hiccup-notebook-1 on version 13.2.1 without any tags.
12.10.1 is the old version I am trying to update from. 13.2.1 is the version I want the runner hiccup-notebook to be updated to.
The name of the unexpected runner seems to be automatically picked up from the hostname lxc-gitlab-runner-hiccup-notebook
.
Note that this runner is also missing the tags.
Both runners show up in the log when running the playbook:
TASK [riemers.gitlab-runner : (Windows) Write config section for each runner] *********************************************************************************************************************************************************************************************
skipping: [gitlab-runner-hiccup-notebook] => (item=concurrent = 16
check_interval = 0
[session_server]
session_timeout = 1800
)
skipping: [gitlab-runner-hiccup-notebook] => (item=
name = "hiccup-notebook"
limit = 0
url = "https://gitlab....com/"
environment = []
token = "t0kEn"
executor = "shell"
output_limit = 4096
[runners.custom_build_dir]
[runners.cache]
)
skipping: [gitlab-runner-hiccup-notebook] => (item=
name = "lxc-gitlab-runner-hiccup-notebook-1"
output_limit = 4096
url = "https://gitlab....com/"
token = "t0kEn"
executor = "shell"
[runners.custom_build_dir]
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]
)
Where does this additional runner come from and how can I avoid it?
Also, how can I make sure the originally installed runner is updated?
An update for the package should be "ok" but any other things like removal or updates may not always work since you need to do api calls for example to remove a runner. This is not something that is in this role. Also there are multiple changes coming in now and then on this role mostly pull request so sometimes it might cause a hickup that i am un aware off. For me the volume is pretty high since i have more things like this :)
Seems this message did not get a lot of love. This does not mean it was not seen but time wise might not have made it to proper attention. This is just the clean up action ;)