Skip to content

Commit

Permalink
Merge pull request #339 from nicoklaus/feature-overwriting-installati…
Browse files Browse the repository at this point in the history
…on-directory

Feature: Allow overwriting of 'gitlab_runner_install_directory'
  • Loading branch information
guenhter authored Dec 4, 2024
2 parents 7bc0aa0 + 5f33c5c commit 9b2d82d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ gitlab_runner_wanted_version: latest
# This variable should not be modified usually as it depends on the gitlab_runner_wanted_version variable
gitlab_runner_wanted_tag: "{{ 'latest' if gitlab_runner_wanted_version == 'latest' else ('v' + gitlab_runner_wanted_version) }}"

# Override the install directory under Windows via host variables etc. (Default: c:/gitlab-runner)
gitlab_runner_custom_install_directory: ""
gitlab_runner_install_directory: "{{ gitlab_runner_default_install_directory if (gitlab_runner_custom_install_directory == '') else gitlab_runner_custom_install_directory }}"

# Overridden based on platform
gitlab_runner_config_file: "{{ __gitlab_runner_config_file_system_mode if gitlab_runner_system_mode else __gitlab_runner_config_file_user_mode }}"
gitlab_runner_config_file_location: "{{ gitlab_runner_config_file | dirname }}"
Expand Down
3 changes: 2 additions & 1 deletion vars/Windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ gitlab_runner_download_url: https://gitlab-runner-downloads.s3.amazonaws.com/{{
# working directory for gitlab runner. defaults to config file directory
gitlab_runner_working_directory: ""

gitlab_runner_install_directory: c:/gitlab-runner/
gitlab_runner_default_install_directory: c:/gitlab-runner/

gitlab_runner_config_file_location: "{{ gitlab_runner_install_directory }}"
gitlab_runner_config_file: "{{ gitlab_runner_config_file_location }}/config.toml" # on Windows

Expand Down

0 comments on commit 9b2d82d

Please sign in to comment.