Ansible collection with roles to install GitLab community edition, enterprise edition and GitLab runners.
- hosts: gitlab_ce
roles:
- srv6d.gitlab.ce
vars:
gitlab_external_url: "https://git.example.com"
gitlab_letsencrypt_enable: true
gitlab_disable_signup: true
gitlab_root_user_password: "TopSecretPassword!"
- hosts: gitlab_runners
roles:
- srv6d.gitlab.runner
vars:
gitlab_runner_ci_server_url: "https://git.example.com"
gitlab_runner_registration_token: "Eyohzaemaiso1ahshahj6Ohpeigh2g"
Role | Description |
---|---|
srv6d.gitlab.ce |
Install GitLab Omnibus Community Edition. |
srv6d.gitlab.ee |
Install GitLab Omnibus Enterprise Edition. |
srv6d.gitlab.runner |
Install a GitLab runner. |
Variable | Required | Default | Input | Comments |
---|---|---|---|---|
gitlab_external_url | yes | null | str |
GitLab URL. |
gitlab_disable_signup | no | false |
bool |
Disable user sign-up.false . |
gitlab_root_user_password | no | null | str |
GitLab root user password. |
gitlab_root_user_blocked | no | false |
bool |
Block GitLab root user.false . |
gitlab_nginx_listen_addresses | no | null | list[str] |
GitLab NGINX listen addresses. If none are defined only unix sockets will be created in '/run/gitlab'. |
gitlab_nginx_ssl_certificate | no | null | str |
Path to GitLab SSL certificate. |
gitlab_nginx_ssl_certificate_key | no | null | str |
Path to GitLab SSL private key. |
gitlab_registry_nginx_listen_addresses | no | null | list[str] |
GitLab registry NGINX listen addresses. If none are defined only unix sockets will be created in '/run/gitlab'. |
gitlab_registry_nginx_listen_port | no | null | int |
GitLab registry NGINX listen port. |
gitlab_registry_nginx_ssl_certificate | no | null | str |
Path to GitLab registry SSL certificate. |
gitlab_registry_nginx_ssl_certificate_key | no | null | str |
Path to GitLab registry SSL private key. |
gitlab_letsencrypt_enable | no | false |
bool |
Manage certificates automatically using LetsEncrypt. |
gitlab_registry_enable | no | true |
bool |
Enable GitLab container registry site-wide. |
gitlab_registry_external_url | no | null | str |
GitLab container registry URL. |
gitlab_smtp_enable | no | false |
bool |
Enable GitLab SMTP. |
gitlab_smtp_address | no | null | str |
GitLab SMTP server address. |
gitlab_smtp_port | no | 465 |
int |
GitLab SMTP server port. |
gitlab_smtp_user_name | no | null | str |
GitLab SMTP server user name. |
gitlab_smtp_user_password | no | null | str |
GitLab SMTP server user password. |
gitlab_smtp_domain | no | null | str |
GitLab SMTP domain. |
gitlab_smtp_authentication | no | null | str "login" /"plain" |
GitLab SMTP authentication. |
gitlab_smtp_enable_starttls_auto | no | null | bool |
Enable SMTP starttls. |
gitlab_smtp_tls | no | null | bool |
Enable SMTP TLS. |
gitlab_email_from | no | null | str |
GitLab Email address that will be used to send Email. |
gitlab_email_display_name | no | null | str |
GitLab Email display name. |
Variable | Required | Default | Input | Comments |
---|---|---|---|---|
gitlab_runner_ci_server_url | yes | null | str |
GitLab runner CI server URL. |
gitlab_runner_registration_token | yes | null | str |
GitLab runner CI server registration token. |
gitlab_runner_tags | no | null | list[str] |
GitLab runner tags. |
gitlab_runner_executor | no | "docker" |
str |
GitLab runner executor. |
gitlab_runner_run_untagged | no | false |
bool |
Run untagged jobs. |
gitlab_runner_limit | no | {{ ansible_processor_nproc }} |
int |
Maximum number of builds processed by the runner. Defaults to number of cores. |
gitlab_runner_docker_image | no | "ubuntu:latest" |
str |
The default Docker image to run jobs with. |
gitlab_runner_docker_privileged | no | false |
bool |
Run job containers in privileged mode. |
gitlab_runner_docker_runtime | no | null | str |
The runtime for Docker containers. |
gitlab_runner_allow_custom_build_dir | no | true |
bool |
Allow user to define a custom build directory for a job. |
The roles in this collection are tested on the following, but may also work with other debain based distributions:
- Ubuntu
- 20.04 LTS (Focal Fossa)
- 22.04 LTS (Jammy Jellyfish)
ansible
passlib
These can be obtained by running pip3 install -r requirements.txt
in
the base of the repository.
GNU General Public License v3.0
Marvin Vogt (git@srv6d.space)