{"id":13625216,"url":"https://github.com/geerlingguy/ansible-role-gitlab","last_synced_at":"2025-12-18T03:09:46.077Z","repository":{"id":14951104,"uuid":"17675756","full_name":"geerlingguy/ansible-role-gitlab","owner":"geerlingguy","description":"Ansible Role - GitLab","archived":true,"fork":false,"pushed_at":"2023-09-06T02:15:27.000Z","size":145,"stargazers_count":673,"open_issues_count":7,"forks_count":467,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-09-25T21:23:29.346Z","etag":null,"topics":["ansible","ci-cd","code","git","gitlab","hosting","role","ruby","vcs"],"latest_commit_sha":null,"homepage":"https://galaxy.ansible.com/geerlingguy/gitlab/","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"zackiles/contentful-node-dashboard","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geerlingguy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":"geerlingguy","patreon":"geerlingguy"}},"created_at":"2014-03-12T17:18:06.000Z","updated_at":"2024-09-07T19:17:03.000Z","dependencies_parsed_at":"2024-01-14T08:45:15.663Z","dependency_job_id":null,"html_url":"https://github.com/geerlingguy/ansible-role-gitlab","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geerlingguy%2Fansible-role-gitlab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geerlingguy%2Fansible-role-gitlab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geerlingguy%2Fansible-role-gitlab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geerlingguy%2Fansible-role-gitlab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geerlingguy","download_url":"https://codeload.github.com/geerlingguy/ansible-role-gitlab/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219876611,"owners_count":16554771,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ci-cd","code","git","gitlab","hosting","role","ruby","vcs"],"created_at":"2024-08-01T21:01:52.603Z","updated_at":"2025-10-04T12:31:12.477Z","avatar_url":"https://github.com/geerlingguy.png","language":"Jinja","funding_links":["https://github.com/sponsors/geerlingguy","https://patreon.com/geerlingguy"],"categories":["vcs","Jinja"],"sub_categories":[],"readme":"# Ansible Role: GitLab\n\n**Deprecated**: In September 2023, I deprecated this role as I am no longer maintaining any GitLab instances, and use Gitea instead for my personal work. Please consider forking this role or use someone else's GitLab role.\n\n[![CI](https://github.com/geerlingguy/ansible-role-gitlab/workflows/CI/badge.svg?event=push)](https://github.com/geerlingguy/ansible-role-gitlab/actions?query=workflow%3ACI)\n\nInstalls GitLab, a Ruby-based front-end to Git, on any RedHat/CentOS or Debian/Ubuntu linux system.\n\nGitLab's default administrator account details are below; be sure to login immediately after installation and change these credentials!\n\n    root\n    5iveL!fe\n\n## Requirements\n\nNone.\n\n## Role Variables\n\nAvailable variables are listed below, along with default values (see `defaults/main.yml`):\n\n    gitlab_domain: gitlab\n    gitlab_external_url: \"https://{{ gitlab_domain }}/\"\n\nThe 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).\n\n    gitlab_git_data_dir: \"/var/opt/gitlab/git-data\"\n\nThe `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.\n\n    gitlab_backup_path: \"/var/opt/gitlab/backups\"\n\nThe `gitlab_backup_path` is the location where Gitlab backups will be stored.\n\n    gitlab_edition: \"gitlab-ce\"\n\nThe edition of GitLab to install. Usually either `gitlab-ce` (Community Edition) or `gitlab-ee` (Enterprise Edition).\n\n    gitlab_version: ''\n\nIf 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).\n\n    gitlab_config_template: \"gitlab.rb.j2\"\n\nThe `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:\n\n  - Create a `templates` directory at the same level as your playbook.\n  - Create a `templates\\mygitlab.rb.j2` file (just choose a different name from the default template).\n  - Set the variable like: `gitlab_config_template: mygitlab.rb.j2` (with the name of your custom template).\n\n### SSL Configuration.\n\n    gitlab_redirect_http_to_https: true\n    gitlab_ssl_certificate: \"/etc/gitlab/ssl/{{ gitlab_domain }}.crt\"\n    gitlab_ssl_certificate_key: \"/etc/gitlab/ssl/{{ gitlab_domain }}.key\"\n\nGitLab 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).\n\n    # SSL Self-signed Certificate Configuration.\n    gitlab_create_self_signed_cert: true\n    gitlab_self_signed_cert_subj: \"/C=US/ST=Missouri/L=Saint Louis/O=IT/CN={{ gitlab_domain }}\"\n\nWhether 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.\n\n### LetsEncrypt Configuration.\n\n    gitlab_letsencrypt_enable: false\n    gitlab_letsencrypt_contact_emails: [\"gitlab@example.com\"]\n    gitlab_letsencrypt_auto_renew_hour: 1\n    gitlab_letsencrypt_auto_renew_minute: 30\n    gitlab_letsencrypt_auto_renew_day_of_month: \"*/7\"\n    gitlab_letsencrypt_auto_renew: true\n\nGitLab LetsEncrypt configuration; tells GitLab whether to request and use a certificate from LetsEncrypt, if `gitlab_letsencrypt_enable` is set to `true`. Multiple contact emails can be configured under `gitlab_letsencrypt_contact_emails` as a list.\n\n    # LDAP Configuration.\n    gitlab_ldap_enabled: false\n    gitlab_ldap_host: \"example.com\"\n    gitlab_ldap_port: \"389\"\n    gitlab_ldap_uid: \"sAMAccountName\"\n    gitlab_ldap_method: \"plain\"\n    gitlab_ldap_bind_dn: \"CN=Username,CN=Users,DC=example,DC=com\"\n    gitlab_ldap_password: \"password\"\n    gitlab_ldap_base: \"DC=example,DC=com\"\n\nGitLab 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.\n\n    gitlab_dependencies:\n      - openssh-server\n      - postfix\n      - curl\n      - openssl\n      - tzdata\n\nDependencies 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`.\n\n    gitlab_time_zone: \"UTC\"\n\nGitlab timezone.\n\n    gitlab_backup_keep_time: \"604800\"\n\nHow long to keep local backups (useful if you don't want backups to fill up your drive!).\n\n    gitlab_download_validate_certs: true\n\nControls whether to validate certificates when downloading the GitLab installation repository install script.\n\n    # Email configuration.\n    gitlab_email_enabled: false\n    gitlab_email_from: \"gitlab@example.com\"\n    gitlab_email_display_name: \"Gitlab\"\n    gitlab_email_reply_to: \"gitlab@example.com\"\n\nGitlab system mail configuration. Disabled by default; set `gitlab_email_enabled` to `true` to enable, and make sure you enter valid from/reply-to values.\n\n    # SMTP Configuration\n    gitlab_smtp_enable: false\n    gitlab_smtp_address: \"smtp.server\"\n    gitlab_smtp_port: \"465\"\n    gitlab_smtp_user_name: \"smtp user\"\n    gitlab_smtp_password: \"smtp password\"\n    gitlab_smtp_domain: \"example.com\"\n    gitlab_smtp_authentication: \"login\"\n    gitlab_smtp_enable_starttls_auto: true\n    gitlab_smtp_tls: false\n    gitlab_smtp_openssl_verify_mode: \"none\"\n    gitlab_smtp_ca_path: \"/etc/ssl/certs\"\n    gitlab_smtp_ca_file: \"/etc/ssl/certs/ca-certificates.crt\"\n\nGitlab SMTP configuration; of `gitlab_smtp_enable` is `true`, the rest of the configuration will tell GitLab how to send mails using an smtp server.\n\n    gitlab_nginx_listen_port: 8080\n\nIf you are running GitLab behind a reverse proxy, you may want to override the listen port to something else.\n\n    gitlab_nginx_listen_https: false\n\nIf you are running GitLab behind a reverse proxy, you may wish to terminate SSL at another proxy server or load balancer\n\n    gitlab_nginx_ssl_verify_client: \"\"\n    gitlab_nginx_ssl_client_certificate: \"\"\n\nIf you want to enable [2-way SSL Client Authentication](https://docs.gitlab.com/omnibus/settings/nginx.html#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`.\n\n    gitlab_default_theme: 2\n\nGitLab 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](https://github.com/gitlabhq/gitlabhq/blob/master/config/gitlab.yml.example#L79-L85).\n\n    gitlab_extra_settings:\n      - gitlab_rails:\n          - key: \"trusted_proxies\"\n            value: \"['foo', 'bar']\"\n          - key: \"env\"\n            type: \"plain\"\n            value: |\n              {\n              \"http_proxy\" =\u003e \"https://my_http_proxy.company.com:3128\",\n              \"https_proxy\" =\u003e \"https://my_http_proxy.company.com:3128\",\n              \"no_proxy\" =\u003e \"localhost, 127.0.0.1, company.com\"\n              }\n      - unicorn:\n          - key: \"worker_processes\"\n            value: 5\n          - key: \"pidfile\"\n            value: \"/opt/gitlab/var/unicorn/unicorn.pid\"\n\nGitlab have many other settings ([see official documentation](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-config-template/gitlab.rb.template)), and you can add them with this special variable `gitlab_extra_settings` with the concerned setting and the `key` and `value` keywords.\n\n## Dependencies\n\nNone.\n\n## Example Playbook\n\n    - hosts: servers\n      vars_files:\n        - vars/main.yml\n      roles:\n        - { role: geerlingguy.gitlab }\n\n*Inside `vars/main.yml`*:\n\n    gitlab_external_url: \"https://gitlab.example.com/\"\n\n## License\n\nMIT / BSD\n\n## Author Information\n\nThis role was created in 2014 by [Jeff Geerling](http://jeffgeerling.com/), author of [Ansible for DevOps](http://ansiblefordevops.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeerlingguy%2Fansible-role-gitlab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeerlingguy%2Fansible-role-gitlab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeerlingguy%2Fansible-role-gitlab/lists"}