gitlab
This role installs and configures Gitlab with Docker Compose. https://docs.gitlab.com/ Optionally it can also configure:
- LDAP authentication
- SMTP service
- Gitlab Pages
- Gitlab Registry
NOTE: When upgrading major versions of Gitlab you might need to update to previous minor or patch versions first before updating to the latest version. Refer to the Gitlab documentation and Docker container logs during the upgrade process for more information.
Requirements
- Tested on Ubuntu LTS but should work on any Debian based system.
- Requires an external reverse proxy (nginx, traefik, haproxy, caddy etc.) in front of Gitlab to handle GUI access and TLS termination.
Role Variables
Refer to defaults/main.yml for the minimal needed variables to install a clean gitlab instance, their default values and descriptions.
Required Variables for Installation
fqdngitlab_docker_networkgitlab_initial_root_personal_passwdgitlab_root_personal_token
Example
Including the gitlab role will install gitlab and apply some general instance wide settings.
# Installs Gitlab
- name: Installing Gitlab...
ansible.builtin.include_role:
name: nova.core.gitlab
To further configure gitlab, groups, users, projects etc
Include extra tasks by referring to them in your vm role, for example, include mnt-groups.yml tasks to create groups in your gitlab.
- name: Include tasks from gitlab role..
ansible.builtin.include_role:
name: nova.core.gitlab
tasks_from: mnt-groups.yml
Useful links
https://www.unavco.org/gitlab/help/administration/troubleshooting/gitlab_rails_cheat_sheet.md https://docs.gitlab.com/ee/api/