All Projects → geerlingguy → Ansible Role Gitlab

geerlingguy / Ansible Role Gitlab

Licence: mit
Ansible Role - GitLab

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Ansible Role Gitlab

ansible-role-gogs
DEPRECATED Ansible Role - Gogs: Go Git Service
Stars: ✭ 27 (-94.12%)
Mutual labels:  hosting, vcs, role
Ansible Gitlab Runner
Ansible role to install gitlab-runner
Stars: ✭ 143 (-68.85%)
Mutual labels:  ansible, role, gitlab
Ansible Role Git
Ansible Role - Git
Stars: ✭ 153 (-66.67%)
Mutual labels:  ansible, role, vcs
Ansible Role Kubernetes
Ansible Role - Kubernetes
Stars: ✭ 247 (-46.19%)
Mutual labels:  ansible, role
Helloworld Msa
Main repository with documentation and support files
Stars: ✭ 218 (-52.51%)
Mutual labels:  ansible, ci-cd
Ansible Role Java
Ansible Role - Java
Stars: ✭ 231 (-49.67%)
Mutual labels:  ansible, role
Hands On Devops
A hands-on DevOps course covering the culture, methods and repeated practices of modern software development involving Packer, Vagrant, VirtualBox, Ansible, Kubernetes, K3s, MetalLB, Traefik, Docker-Compose, Docker, Taiga, GitLab, Drone CI, SonarQube, Selenium, InSpec, Alpine 3.10, Ubuntu-bionic, CentOS 7...
Stars: ✭ 196 (-57.3%)
Mutual labels:  ansible, gitlab
go-scm
Package scm provides a unified interface to multiple source code management systems.
Stars: ✭ 117 (-74.51%)
Mutual labels:  gitlab, vcs
Containerization-Automation
Study and Use of Containers and Automation Tools
Stars: ✭ 45 (-90.2%)
Mutual labels:  gitlab, code
Ansible Role Postgresql
Ansible Role - PostgreSQL
Stars: ✭ 310 (-32.46%)
Mutual labels:  ansible, role
Ansible Role Apache
Ansible Role - Apache 2.x.
Stars: ✭ 341 (-25.71%)
Mutual labels:  ansible, role
Ansible Role Ntp
Ansible Role - NTP
Stars: ✭ 203 (-55.77%)
Mutual labels:  ansible, role
Werf
The CLI tool gluing Git, Docker, Helm, and Kubernetes with any CI system to implement CI/CD and Giterminism
Stars: ✭ 2,814 (+513.07%)
Mutual labels:  ansible, ci-cd
Ansible Role Homebrew
Ansible Role - Homebrew
Stars: ✭ 195 (-57.52%)
Mutual labels:  ansible, role
Ansible Role Nodejs
Ansible Role - Node.js
Stars: ✭ 322 (-29.85%)
Mutual labels:  ansible, role
Ansible Role Firewall
Ansible Role - iptables Firewall configuration.
Stars: ✭ 343 (-25.27%)
Mutual labels:  ansible, role
godot-ci
Docker image to export Godot Engine games. Templates for Gitlab CI and GitHub Actions to deploy to GitLab Pages/GitHub Pages/Itch.io.
Stars: ✭ 316 (-31.15%)
Mutual labels:  gitlab, ci-cd
Ansible Role Php
Ansible Role - PHP
Stars: ✭ 396 (-13.73%)
Mutual labels:  ansible, role
Ansible Collection Hardening
This Ansible collection provides battle tested hardening for Linux, SSH, nginx, MySQL
Stars: ✭ 2,543 (+454.03%)
Mutual labels:  ansible, role
Ansible Nginx Hardening
This Ansible role provides secure nginx configurations.
Stars: ✭ 180 (-60.78%)
Mutual labels:  ansible, role

Ansible Role: GitLab

CI

Installs GitLab, a Ruby-based front-end to Git, on any RedHat/CentOS or Debian/Ubuntu linux system.

GitLab's default administrator account details are below; be sure to login immediately after installation and change these credentials!

root
5iveL!fe

Requirements

None.

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

gitlab_domain: gitlab
gitlab_external_url: "https://{{ gitlab_domain }}/"

The domain and URL at which the GitLab instance will be accessible. This is set as the external_url configuration setting in gitlab.rb, and if you want to run GitLab on a different port (besides 80/443), you can specify the port here (e.g. https://gitlab:8443/ for port 8443).

gitlab_git_data_dir: "/var/opt/gitlab/git-data"

The gitlab_git_data_dir is the location where all the Git repositories will be stored. You can use a shared drive or any path on the system.

gitlab_backup_path: "/var/opt/gitlab/backups"

The gitlab_backup_path is the location where Gitlab backups will be stored.

gitlab_edition: "gitlab-ce"

The edition of GitLab to install. Usually either gitlab-ce (Community Edition) or gitlab-ee (Enterprise Edition).

gitlab_version: ''

If you'd like to install a specific version, set the version here (e.g. 11.4.0-ce.0 for Debian/Ubuntu, or 11.4.0-ce.0.el7 for RedHat/CentOS).

gitlab_config_template: "gitlab.rb.j2"

The gitlab.rb.j2 template packaged with this role is meant to be very generic and serve a variety of use cases. However, many people would like to have a much more customized version, and so you can override this role's default template with your own, adding any additional customizations you need. To do this:

  • Create a templates directory at the same level as your playbook.
  • Create a templates\mygitlab.rb.j2 file (just choose a different name from the default template).
  • Set the variable like: gitlab_config_template: mygitlab.rb.j2 (with the name of your custom template).

SSL Configuration.

gitlab_redirect_http_to_https: "true"
gitlab_ssl_certificate: "/etc/gitlab/ssl/{{ gitlab_domain }}.crt"
gitlab_ssl_certificate_key: "/etc/gitlab/ssl/{{ gitlab_domain }}.key"

GitLab SSL configuration; tells GitLab to redirect normal http requests to https, and the path to the certificate and key (the default values will work for automatic self-signed certificate creation, if set to true in the variable below).

# SSL Self-signed Certificate Configuration.
gitlab_create_self_signed_cert: "true"
gitlab_self_signed_cert_subj: "/C=US/ST=Missouri/L=Saint Louis/O=IT/CN={{ gitlab_domain }}"

Whether to create a self-signed certificate for serving GitLab over a secure connection. Set gitlab_self_signed_cert_subj according to your locality and organization.

# LDAP Configuration.
gitlab_ldap_enabled: "false"
gitlab_ldap_host: "example.com"
gitlab_ldap_port: "389"
gitlab_ldap_uid: "sAMAccountName"
gitlab_ldap_method: "plain"
gitlab_ldap_bind_dn: "CN=Username,CN=Users,DC=example,DC=com"
gitlab_ldap_password: "password"
gitlab_ldap_base: "DC=example,DC=com"

GitLab LDAP configuration; if gitlab_ldap_enabled is true, the rest of the configuration will tell GitLab how to connect to an LDAP server for centralized authentication.

gitlab_dependencies:
  - openssh-server
  - postfix
  - curl
  - openssl
  - tzdata

Dependencies required by GitLab for certain functionality, like timezone support or email. You may change this list in your own playbook if, for example, you would like to install exim instead of postfix.

gitlab_time_zone: "UTC"

Gitlab timezone.

gitlab_backup_keep_time: "604800"

How long to keep local backups (useful if you don't want backups to fill up your drive!).

gitlab_download_validate_certs: true

Controls whether to validate certificates when downloading the GitLab installation repository install script.

# Email configuration.
gitlab_email_enabled: "false"
gitlab_email_from: "[email protected]"
gitlab_email_display_name: "Gitlab"
gitlab_email_reply_to: "[email protected]"

Gitlab system mail configuration. Disabled by default; set gitlab_email_enabled to true to enable, and make sure you enter valid from/reply-to values.

# SMTP Configuration
gitlab_smtp_enable: "false"
gitlab_smtp_address: "smtp.server"
gitlab_smtp_port: "465"
gitlab_smtp_user_name: "smtp user"
gitlab_smtp_password: "smtp password"
gitlab_smtp_domain: "example.com"
gitlab_smtp_authentication: "login"
gitlab_smtp_enable_starttls_auto: "true"
gitlab_smtp_tls: "false"
gitlab_smtp_openssl_verify_mode: "none"
gitlab_smtp_ca_path: "/etc/ssl/certs"
gitlab_smtp_ca_file: "/etc/ssl/certs/ca-certificates.crt"

Gitlab SMTP configuration; of gitlab_smtp_enable is true, the rest of the configuration will tell GitLab how to send mails using an smtp server.

gitlab_nginx_listen_port: 8080

If you are running GitLab behind a reverse proxy, you may want to override the listen port to something else.

gitlab_nginx_listen_https: "false"

If you are running GitLab behind a reverse proxy, you may wish to terminate SSL at another proxy server or load balancer

gitlab_nginx_ssl_verify_client: ""
gitlab_nginx_ssl_client_certificate: ""

If you want to enable 2-way SSL Client Authentication, set gitlab_nginx_ssl_verify_client and add a path to the client certificate in gitlab_nginx_ssl_client_certificate.

gitlab_default_theme: 2

GitLab includes a number of themes, and you can set the default for all users with this variable. See the included GitLab themes to choose a default.

gitlab_extra_settings:
  - gitlab_rails:
      - key: "trusted_proxies"
        value: "['foo', 'bar']"
      - key: "env"
        type: "plain"
        value: |
          {
          "http_proxy" => "https://my_http_proxy.company.com:3128",
          "https_proxy" => "https://my_http_proxy.company.com:3128",
          "no_proxy" => "localhost, 127.0.0.1, company.com"
          }
  - unicorn:
      - key: "worker_processes"
        value: 5
      - key: "pidfile"
        value: "/opt/gitlab/var/unicorn/unicorn.pid"

Gitlab have many other settings (see official documentation), and you can add them with this special variable gitlab_extra_settings with the concerned setting and the key and value keywords.

Dependencies

None.

Example Playbook

- hosts: servers
  vars_files:
    - vars/main.yml
  roles:
    - { role: geerlingguy.gitlab }

Inside vars/main.yml:

gitlab_external_url: "https://gitlab.example.com/"

License

MIT / BSD

Author Information

This role was created in 2014 by Jeff Geerling, author of Ansible for DevOps.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].