Skip to content
Snippets Groups Projects
Commit 2f789b07 authored by Mark's avatar Mark
Browse files

Remove ssh variable requirement, set docker-volumes correctly for 10.x, add locked variable

parent 40fd0033
No related branches found
No related tags found
No related merge requests found
......@@ -19,4 +19,15 @@ gitlab_runner_docker_image: ''
gitlab_runner_tags: []
# Docker privileged mode
gitlab_runner_docker_privileged: false
# Runner SSH user
gitlab_runner_ssh_user: ''
# Runner SSH host
gitlab_runner_ssh_host: ''
# Runner SSH port
gitlab_runner_ssh_port: ''
# Runner SSH password
gitlab_runner_ssh_password: ''
# Runner SSH identity file
gitlab_runner_ssh_identity_file: ''
# Runner Locked
gitlab_runner_locked: 'false'
\ No newline at end of file
---
- name: restart_gitlab_runner
service: name=gitlab-runner state=restarted
become: yes
---
- name: Install GitLab Runner (Debian)
include: install-debian.yml
import_tasks: install-debian.yml
when: ansible_os_family == 'Debian'
- name: Install GitLab Runner (RedHat)
include: install-redhat.yml
import_tasks: install-redhat.yml
when: ansible_os_family == 'RedHat'
- name: Set global options
include: global-setup.yml
import_tasks: global-setup.yml
- name: Register GitLab Runner
include: register-runner.yml
import_tasks: register-runner.yml
when: gitlab_runner_registration_token != ''
......@@ -12,11 +12,14 @@
--description '{{ gitlab_runner_description }}'
--tag-list '{{ gitlab_runner_tags | join(",") }}'
--executor '{{ gitlab_runner_executor }}'
--locked='{{gitlab_runner_locked}}'
--docker-image '{{ gitlab_runner_docker_image }}'
--docker-volumes [ "{{ gitlab_runner_docker_volumes | join('", "') }}" ]
--ssh-user '{{gitlab_runner_ssh_user}}'
--ssh-host '{{gitlab_runner_ssh_host}}'
--ssh-port '{{gitlab_runner_ssh_port}}'
--ssh-password '{{gitlab_runner_ssh_password}}'
--ssh-identity-file '{{gitlab_runner_ssh_identity_file}}'
when: configured_runners.stderr.find('\n{{ gitlab_runner_description }}') == -1
{% if gitlab_runner_docker_volumes is defined %}
--docker-volumes "{{ gitlab_runner_docker_volumes | join('" "') }}"
{% endif %}
--ssh-user '{{ gitlab_runner_ssh_user }}'
--ssh-host '{{ gitlab_runner_ssh_host }}'
--ssh-port '{{ gitlab_runner_ssh_port }}'
--ssh-password '{{ gitlab_runner_ssh_password }}'
--ssh-identity-file '{{ gitlab_runner_ssh_identity_file }}'
when: configured_runners.stderr.find('\n' + gitlab_runner_description) == -1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment