Closed michaelmell closed 5 months ago
I would say no, but check the code if it does a call to 'unregister' if the state is absent. If this is not there you could use the same call to register to unregister and add a task for that.
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 ;)
Intro
I am having an issue with Gitlab runner not being unregistered correctly from the Gitlab instance when setting
state
frompresent
toabsent
.Please see the details under Error description.
Info about the environment
Ansible version
Gitlab-runner role version
Playbook
Content of
vars/gitlab_runners.yml
is shown in the following sectionError description
This is the configuration:
It creates and configures the Gitlab runner in
/etc/gitlab/config.toml
and registers it with our self-hosted Gitlab instance (as expected).When I now change
state
configuration toabsent
, i.e.:it removes the runner configuration from
/etc/gitlab/config.toml
.But it does not unregister/remove the runner from the Gitlab instance. (It is still shown under Settings -> CI/CD -> Project runners)
Furthermore, setting
state
back topresent
will register the runner again, so that it now exists twice in the Project runner section of the Gitlab instance.Is this expected behavior?