Ansible Role: GitLab
Installs and configures the GitLab EE DevOps platform.
Requirements
Ansible 2.2 or higher.
Role Variables
Available variables are listed below, along with their default values (see
defaults/main.yml
for more info):
dubzland_gitlab_edition
dubzland_gitlab_edition: 'gitlab-ee'
Edition of GitLab to install (ee/ce).
dubzland_gitlab_version
dubzland_gitlab_version: "13.1.4"
Specific version of GitLab to install.
dubzland_gitlab_configuration_template
dubzland_gitlab_configuration_template: 'etc/gitlab/gitlab.rb.j2'
Template used to generate /etc/gitlab/gitlab.rb
. Override if you need more
customization than the variables provided.
dubzland_gitlab_external_url
dubzland_gitlab_external_url: 'https://gitlab/'
URL on which GitLab will be reachable.
dubzland_gitlab_time_zone
dubzland_gitlab_time_zone: 'UTC'
Default time zone used for dates in GitLab.
dubzland_gitlab_email_enabled
dubzland_gitalb_email_enabled: "false"
Should GitLab generate emails? (must be a string).
dubzland_gitlab_email_from
dubzland_gitlab_email_from: 'gitlab@example.com'
Source email address used by GitLab for outgoing emails.
dubzland_gitlab_email_display_name
dubzland_gitlab_email_display_name: 'GitLab'
Human readable name to use for outgoing emails.
dubzland_gitlab_email_reply_to
dubzland_gitlab_email_reply_to: 'gitlab@example.com'
Reply-to email address used in outgoing emails.
dubzland_gitlab_default_theme
dubzland_gitlab_default_theme: 1
Theme used as the default for new users.
dubzland_gitlab_nginx_redirect_http_to_https
dubzland_gitlab_nginx_redirect_http_to_https: "true"
Should GitLab redirect http://
traffic to https://
? (must be a string)
dubzland_gitlab_nginx_ssl_certificate/dubzland_gitlab_nginx_ssl_certificate_key
dubzland_gitlab_nginx_ssl_certificate: "/etc/gitlab/ssl/gitlab.crt"
dubzland_gitlab_nginx_ssl_certificate_key: "/etc/gitlab/ssl/gitlab.key"
SSL Certificate/key to use for https://
traffic.
dubzland_gitlab_nginx_ssl_protocols
dubzland_gitlab_nginx_ssl_protocols: "TLSv1.1 TLSv1.2"
TLS versions NGINX should support.
dubzland_gitlab_nginx_listen_port
# dubzland_gitlab_nginx_listen_port: 80
Override the port GitLab's nginx server will listen on.
dubzland_gitlab_nginx_listen_https
# dubzland_gitlab_nginx_listen_https: "false"
Should GitLab accept https://
connections? Set this to "false" if you have
another reverse proxy handling TLS termination.
dubzland_gitlab_create_self_signed_cert
dubzland_gitlab_create_self_signed_cert: "true"
Whether or not a self-signed certificate should be generated. If true
, the
certificate/key specified above will be generated.
dubzland_gitlab_self_signed_cert_subject
dubzland_gitlab_self_signed_cert_subject: "/C=US/ST=Mississippi/L=Hernaneo/O=Tech/CN=gitlab"
Subject to use when generating a self-signed certificate.
dubzland_gitlab_backups_enabled
dubzland_gitlab_backups_enabled: True
Whether the daily backup job should be enabled.
dubzland_gitlab_backup_keep_time
dubzland_gitlab_backup_keep_time: 604800
Time (in seconds) to retain backups (7 days).
Dependencies
None.
Example Playbook
- hosts: servers
roles:
- role: dubzland.gitlab
vars:
dubzland_gitlab_external_url: 'https://git.example.com'
License
MIT