You've already forked gitlab-runner
fix: gitlab runner registrations
This commit is contained in:
@@ -6,6 +6,5 @@ gitlab_runner_instance_url: "https://gitlab.com"
|
||||
gitlab_runner_user: "gitlab-runner"
|
||||
gitlab_runner_working_directory: "/home/gitlab-runner"
|
||||
gitlab_runner_config_path: "/etc/gitlab-runner/config.toml"
|
||||
gitlab_runner_runner_description: "The runner was registered using ansible."
|
||||
gitlab_runner_docker_default_image: "alpine"
|
||||
gitlab_runner_concurrent: 1
|
||||
|
||||
@@ -8,14 +8,11 @@
|
||||
ansible.builtin.shell:
|
||||
gitlab-runner register
|
||||
--non-interactive
|
||||
--name {{ gitlab_runner_name | default(inventory_hostname) }}
|
||||
--url {{ gitlab_runner_instance_url }}
|
||||
--clone-url {{ gitlab_runner_instance_url }}
|
||||
--registration-token {{ gitlab_runner_registration_token }}
|
||||
--executor docker
|
||||
--description "{{ gitlab_runner_runner_description }}"
|
||||
--docker-image "{{ gitlab_runner_docker_default_image }}"
|
||||
--tag-list "{{ gitlab_runner_tags | default(inventory_hostname) }}"
|
||||
when: gitlab_runner_config.stat.exists == False and gitlab_runner_executor == 'docker'
|
||||
become: yes
|
||||
|
||||
@@ -23,12 +20,9 @@
|
||||
ansible.builtin.shell: >
|
||||
gitlab-runner register
|
||||
--non-interactive
|
||||
--name {{ gitlab_runner_name | default(inventory_hostname) }}
|
||||
--url {{ gitlab_runner_instance_url }}
|
||||
--clone-url {{ gitlab_runner_instance_url }}
|
||||
--registration-token {{ gitlab_runner_registration_token }}
|
||||
--executor shell
|
||||
--description "{{ gitlab_runner_runner_description }}"
|
||||
--tag-list "{{ gitlab_runner_tags | default(inventory_hostname) }}"
|
||||
when: gitlab_runner_config.stat.exists == False and gitlab_runner_executor == 'shell'
|
||||
become: yes
|
||||
|
||||
Reference in New Issue
Block a user