egeneralov.gitlab_runner
egeneralov.gitlab_runner
Set up GitLab Runner with automatic configuration.
Requirements
- A Debian-based system
- GitLab (can be self-hosted)
Quick Installation
Run this command in your terminal:
wget -O - https://raw.githubusercontent.com/egeneralov/gitlab-runner/master/get.sh 2>/dev/null | GITLAB_TOKEN=b6jR_DnMjMSWVExkhjX1 bash -xe
You can set the following values:
- GITLAB_URL (optional):
https://gitlab.com
- GITLAB_TOKEN (required)
- GITLAB_NAME (optional):
$(hostname)
Note: The runner will be assigned one tag that is the same as its name.
Role Variables
- gitlab_runner_executor: "docker"
- gitlab_runner_ci_server_url: https://gitlab.com/
- gitlab_runner_registration_token: b6jR_DnMjMSWVExkhjX1
- gitlab_runner_docker_default_image: docker:dind
- gitlab_runner_config_file: /etc/gitlab-runner/config.toml
- gitlab_runner_docker_image: gitlab/gitlab-runner:v11.6.1
- gitlab_runner_tag_list:
- gitlab
- docker
- gitlab_runner_register_run_untagged: "true"
- gitlab_runner_register_locked: "false"
- gitlab_runner_request_concurrency: 2
- gitlab_runner_name: my-gitlab-runner
- gitlab_runner_ci_server_token: ""
- gitlab_runner_ci_server_tls_ca_file: ""
- gitlab_runner_ci_server_tls_cert_file: ""
- gitlab_runner_ci_server_tls_key_file: ""
- gitlab_runner_builds_dir: ""
- gitlab_runner_pre_clone_script: ""
- gitlab_runner_pre_build_script: ""
- gitlab_runner_post_build_script: ""
Dependencies
- egeneralov.docker
Example Playbook
Here's how to use it in your playbook:
- hosts: gitlab-runner-dind
vars:
gitlab_runner_executor: dind
gitlab_runner_ci_server_url: https://gitlab.com/
gitlab_runner_registration_token: b6jR_DnMjMSWVExkhjX1
gitlab_runner_docker_default_image: docker:dind
gitlab_runner_docker_image: gitlab/gitlab-runner:v11.8.0
gitlab_runner_tag_list:
- dind
gitlab_runner_register_run_untagged: "true"
gitlab_runner_register_locked: "false"
gitlab_runner_name: my-dind-gitlab-runner
roles:
- egeneralov.docker
- egeneralov.gitlab_runner
- hosts: gitlab-runner-shell
vars:
gitlab_runner_executor: shell
gitlab_runner_ci_server_url: https://gitlab.com/
gitlab_runner_registration_token: b6jR_DnMjMSWVExkhjX1
gitlab_runner_tag_list:
- shell
gitlab_runner_register_run_untagged: "true"
gitlab_runner_register_locked: "false"
gitlab_runner_name: my-shell-gitlab-runner
roles:
- egeneralov.gitlab_runner
License
MIT
Author Information
Eduard Generalov eduard@generalov.net
Installa
ansible-galaxy install egeneralov.gitlab_runner
Licenza
mit
Download
207
Proprietario