feat: added runner registration name

This commit is contained in:
2024-02-25 18:47:49 +00:00
parent 134b826a70
commit 3ad6f02295

View File

@@ -8,13 +8,14 @@
ansible.builtin.shell: ansible.builtin.shell:
gitlab-runner register gitlab-runner register
--non-interactive --non-interactive
--name {{ gitlab_runner_name | default(inventory_hostname) }}
--url {{ gitlab_runner_instance_url }} --url {{ gitlab_runner_instance_url }}
--clone-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 }}"
--docker-image "{{ gitlab_runner_docker_default_image }}" --docker-image "{{ gitlab_runner_docker_default_image }}"
--tag-list "{{ gitlab_runner_tags | default('') }}" --tag-list "{{ gitlab_runner_tags | default(inventory_hostname) }}"
when: gitlab_runner_config.stat.exists == False and gitlab_runner_executor == 'docker' when: gitlab_runner_config.stat.exists == False and gitlab_runner_executor == 'docker'
become: yes become: yes
@@ -22,11 +23,12 @@
ansible.builtin.shell: > ansible.builtin.shell: >
gitlab-runner register gitlab-runner register
--non-interactive --non-interactive
--name {{ gitlab_runner_name | default(inventory_hostname) }}
--url {{ gitlab_runner_instance_url }} --url {{ gitlab_runner_instance_url }}
--clone-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 }}"
--tag-list "{{ runner_tags | default('') }}" --tag-list "{{ gitlab_runner_tags | default(inventory_hostname) }}"
when: gitlab_runner_config.stat.exists == False and gitlab_runner_executor == 'shell' when: gitlab_runner_config.stat.exists == False and gitlab_runner_executor == 'shell'
become: yes become: yes