You've already forked gitlab-runner
fix: added setup clone-url and customize concurrent
This commit is contained in:
@@ -8,3 +8,4 @@ gitlab_runner_working_directory: "/home/gitlab-runner"
|
|||||||
gitlab_runner_config_path: "/etc/gitlab-runner/config.toml"
|
gitlab_runner_config_path: "/etc/gitlab-runner/config.toml"
|
||||||
gitlab_runner_runner_description: "The runner was registered using ansible."
|
gitlab_runner_runner_description: "The runner was registered using ansible."
|
||||||
gitlab_runner_docker_default_image: "alpine"
|
gitlab_runner_docker_default_image: "alpine"
|
||||||
|
gitlab_runner_concurrent: 1
|
||||||
|
|||||||
@@ -21,4 +21,16 @@
|
|||||||
group: "{{ gitlab_runner_user }}"
|
group: "{{ gitlab_runner_user }}"
|
||||||
recurse: yes
|
recurse: yes
|
||||||
|
|
||||||
|
- name: "Post-fix altered config"
|
||||||
|
ansible.builtin.replace:
|
||||||
|
path: " {{ gitlab_runner_config_path }}"
|
||||||
|
regexp: "concurrent *= *\\d+"
|
||||||
|
replace: "concurrent = {{ gitlab_runner_concurrent }}"
|
||||||
|
|
||||||
|
- name: "Reload config"
|
||||||
|
ansible.builtin.shell:
|
||||||
|
# see https://docs.gitlab.com/runner/commands/#signals
|
||||||
|
cmd: "pkill -SIGHUP -f gitlab-runner"
|
||||||
|
|
||||||
|
|
||||||
- meta: flush_handlers
|
- meta: flush_handlers
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
gitlab-runner register
|
gitlab-runner register
|
||||||
--non-interactive
|
--non-interactive
|
||||||
--url {{ gitlab_runner_instance_url }}
|
--url {{ gitlab_runner_instance_url }}
|
||||||
|
--clone-url {{ gitlab_runner_instance_url }}
|
||||||
--registration-token {{ gitlab_runner_registration_token }}
|
--registration-token {{ gitlab_runner_registration_token }}
|
||||||
--executor docker
|
--executor docker
|
||||||
--description "{{ gitlab_runner_runner_description }}"
|
--description "{{ gitlab_runner_runner_description }}"
|
||||||
@@ -22,6 +23,7 @@
|
|||||||
gitlab-runner register
|
gitlab-runner register
|
||||||
--non-interactive
|
--non-interactive
|
||||||
--url {{ gitlab_runner_instance_url }}
|
--url {{ gitlab_runner_instance_url }}
|
||||||
|
--clone-url {{ gitlab_runner_instance_url }}
|
||||||
--registration-token {{ gitlab_runner_registration_token }}
|
--registration-token {{ gitlab_runner_registration_token }}
|
||||||
--executor shell
|
--executor shell
|
||||||
--description "{{ gitlab_runner_runner_description }}"
|
--description "{{ gitlab_runner_runner_description }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user