cmacrae.gitlab

Ansible Role: GitLab

Build Status

This role installs GitLab, which is a Ruby-based interface for Git, on RedHat/CentOS or Debian/Ubuntu systems.

Below are the default login details for GitLab's administrator account. Please log in right after installation and change these credentials!

root
5iveL!fe

About This Fork

This is a copy of geerlingguy/ansible-role-gitlab.
This version adds the option to include extra static settings in the gitlab.rb file.

I’m releasing this role because a pull request has been open for a while, and I want to make these features available.

Requirements

No specific requirements.

Role Variables

Here are the available variables and their default values (see defaults/main.yml):

gitlab_external_url: "https://gitlab/"

This is the URL where your GitLab instance will be available. You can change the port if you want to use a different one (like https://gitlab:8443/ for port 8443).

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

This is where all Git repositories will be stored. You can point it to a shared drive or any path on your system.

# SSL Configuration
gitlab_redirect_http_to_https: "true"
gitlab_ssl_certificate: "/etc/gitlab/ssl/gitlab.crt"
gitlab_ssl_certificate_key: "/etc/gitlab/ssl/gitlab.key"

This is for SSL configuration. It tells GitLab to convert normal HTTP requests to HTTPS and specifies where the SSL certificate and key are stored. The default settings allow for automatic creation of a self-signed certificate if set to true.

# Self-signed Certificate Settings
gitlab_create_self_signed_cert: true
gitlab_self_signed_cert_subj: "/C=US/ST=Missouri/L=Saint Louis/O=IT/CN=gitlab"

Use this if you want to create a self-signed certificate for a secure connection. Adjust gitlab_self_signed_cert_subj to fit your location 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"

This is for LDAP configuration. If gitlab_ldap_enabled is set to true, the rest of the settings will help GitLab connect to an LDAP server for user authentication.

# Extra Static Configuration
gitlab_extra_config: ~

This allows you to add more configuration options in gitlab.rb. If you provide settings in this variable, they will be included as raw options, like this:

# Extra Static Configuration
gitlab_extra_config: |
gitlab_rails['lfs_enabled'] = true
gitlab_rails['lfs_storage_path'] = "/mnt/storage/lfs-objects"

By default, this is empty, so if you don't add any extra settings, they won't appear in the GitLab configuration.

Dependencies

No dependencies.

Example Playbook

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

In vars/main.yml:

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

License

MIT / BSD

Author Information

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

Informazioni sul progetto

GitLab Git web interface

Installa
ansible-galaxy install cmacrae.gitlab
Licenza
Unknown
Download
262
Proprietario