diff --git a/roles/gitlab/meta/main.yml b/roles/gitlab/meta/main.yml index d131b7c..372ed4c 100644 --- a/roles/gitlab/meta/main.yml +++ b/roles/gitlab/meta/main.yml @@ -1,16 +1,6 @@ --- dependencies: - role: alphanodes.setup.common - - role: alphanodes.setup.rsync - when: not gitlab_remove - - role: alphanodes.setup.ssl - when: not gitlab_remove - - role: alphanodes.setup.redis_server - when: not gitlab_remove - - role: alphanodes.setup.nginx - when: not gitlab_remove - - role: alphanodes.setup.postgresql - when: not gitlab_remove galaxy_info: description: Setup gitlab diff --git a/roles/gitlab/tasks/postgresql.yml b/roles/gitlab/tasks/postgresql.yml index c0d50c2..ad38dfc 100644 --- a/roles/gitlab/tasks/postgresql.yml +++ b/roles/gitlab/tasks/postgresql.yml @@ -1,5 +1,9 @@ --- +- name: Include postgresql role + ansible.builtin.include_role: + name: alphanodes.setup.postgresql + - name: Create gitlab postgresql database user become_user: postgres become: true diff --git a/roles/gitlab/tasks/setup.yml b/roles/gitlab/tasks/setup.yml index cbdf510..86b56ff 100644 --- a/roles/gitlab/tasks/setup.yml +++ b/roles/gitlab/tasks/setup.yml @@ -20,6 +20,24 @@ ansible.builtin.set_fact: gitaly_socket_path: "{{ gitaly_socket_dir }}/gitaly.socket" +- name: Include rsync role + ansible.builtin.include_role: + name: alphanodes.setup.rsync + +- name: Include ssl role + ansible.builtin.include_role: + name: alphanodes.setup.ssl + +- name: Include redis_server role + ansible.builtin.include_role: + name: alphanodes.setup.redis_server + +- name: Include nginx role + ansible.builtin.include_role: + name: alphanodes.setup.nginx + vars: + nginx_with_websocket: true + - name: Install required packages for gitlab ansible.builtin.apt: name: '{{ gitlab_packages }}' diff --git a/roles/gitlab/templates/etc/nginx/gitlab.j2 b/roles/gitlab/templates/etc/nginx/gitlab.j2 index 8ecd4c7..a6366d8 100644 --- a/roles/gitlab/templates/etc/nginx/gitlab.j2 +++ b/roles/gitlab/templates/etc/nginx/gitlab.j2 @@ -7,11 +7,6 @@ upstream gitlab-workhorse { server unix:{{ gitlab_workhorse_socket }} fail_timeout=0; } -map $http_upgrade $connection_upgrade_gitlab_ssl { - default upgrade; - '' close; -} - ## NGINX 'combined' log format with filtered query strings log_format gitlab_ssl_access '$remote_addr - $remote_user [$time_local] "$request_method $gitlab_ssl_filtered_request_uri $server_protocol" $status $body_bytes_sent "$gitlab_ssl_filtered_http_referer" "$http_user_agent"'; @@ -101,7 +96,7 @@ server { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $connection_upgrade_gitlab_ssl; + proxy_set_header Connection $connection_upgrade; proxy_pass http://gitlab-workhorse; }