gitlab external database prep

This commit is contained in:
nazunalika 2020-12-28 20:43:17 -07:00
parent 5f2426d840
commit b8ea1c51a1
3 changed files with 16 additions and 1 deletions

View File

@ -69,7 +69,7 @@
- name: Apply fcontext to GitLab unix socket for nginx - name: Apply fcontext to GitLab unix socket for nginx
command: restorecon -v /var/opt/gitlab/gitlab-workhorse/sockets/socket command: restorecon -v /var/opt/gitlab/gitlab-workhorse/sockets/socket
register: restorecon_result register: restorecon_result
changed_when: "restorecon_result == 0" changed_when: "restorecon_result.rc == 0"
- name: Add firewall rules - http/s - name: Add firewall rules - http/s
ansible.posix.firewalld: ansible.posix.firewalld:

View File

@ -122,3 +122,13 @@ registry_nginx['ssl_certificate_key'] = "{{ gitlab_registry_nginx_ssl_certificat
# https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#changing-gitlab-yml-settings # https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#changing-gitlab-yml-settings
nginx['enable'] = false nginx['enable'] = false
nginx['external_users'] = ['nginx'] nginx['external_users'] = ['nginx']
{% if gitlab_external_db %}
postgresql['enable'] = false
gitlab_rails['db_adapter'] = 'postgresql'
gitlab_rails['db_encoding'] = 'unicode'
gitlab_rails['db_host'] = '{{ gitlab_external_db_host }}'
gitlab_rails['db_port'] = '{{ gitlab_external_db_port }}'
gitlab_rails['db_username'] = '{{ gitlab_external_db_user }}'
gitlab_rails['db_password'] = '{{ gitlab_external_db_password }}'
{% endif %}

View File

@ -61,3 +61,8 @@ gitlab_nginx_listen_port: 8080
gitlab_nginx_listen_https: "false" gitlab_nginx_listen_https: "false"
gitlab_default_theme: 2 gitlab_default_theme: 2
gitlab_external_db: false
gitlab_external_db_host: db.rockylinux.org
gitlab_external_db_user: gitlab
gitlab_external_db_password: gitlab