Skip to content

Commit

Permalink
Merge pull request #267 from AJDurant/unregister-dir
Browse files Browse the repository at this point in the history
Change directory before unregistering
  • Loading branch information
guenhter authored Jun 23, 2023
2 parents 52a431c + 24ac275 commit 89e5e9c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tasks/register-runner-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@

- name: (Windows) Unregister runner when config has changed
win_command: '{{ gitlab_runner_executable }} unregister --name {{ actual_gitlab_runner_name }}'
when:
args:
chdir: "{{ gitlab_runner_config_file_location }}"
when:
- actual_gitlab_runner_name in registered_gitlab_runner_names
- runner_config_state.changed
when: gitlab_runner_config_update_mode == 'by_registering'
Expand All @@ -132,7 +134,7 @@
{% if gitlab_runner.ssh_password is defined %}
--ssh-password '{{ gitlab_runner.ssh_password }}'
{% endif %}
when:
when:
- actual_gitlab_runner_name) not in registered_gitlab_runner_names
- gitlab_runner.state|default('present') == 'present'
args:
Expand Down

0 comments on commit 89e5e9c

Please sign in to comment.