Add GitLab EE Ansible role (temp location - move to infrastructure/ansible)
This commit is contained in:
36
infrastructure/ansible/roles/gitlab/tasks/main.yml
Normal file
36
infrastructure/ansible/roles/gitlab/tasks/main.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
- name: Create GitLab directories
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
owner: "{{ docker_uid }}"
|
||||
group: "{{ docker_gid }}"
|
||||
mode: '0755'
|
||||
loop:
|
||||
- "{{ gitlab_config_path }}"
|
||||
- "{{ gitlab_logs_path }}"
|
||||
- "{{ gitlab_data_path }}"
|
||||
- "{{ gitlab_state_path }}"
|
||||
|
||||
- name: Deploy docker-compose.yml
|
||||
ansible.builtin.template:
|
||||
src: docker-compose.yml.j2
|
||||
dest: "{{ gitlab_base_path }}/docker-compose.yml"
|
||||
owner: "{{ docker_uid }}"
|
||||
group: "{{ docker_gid }}"
|
||||
mode: '0600'
|
||||
notify: Restart GitLab
|
||||
|
||||
- name: Deploy nginx reverse proxy config
|
||||
ansible.builtin.template:
|
||||
src: nginx.conf.j2
|
||||
dest: "{{ gitlab_base_path }}/nginx.conf"
|
||||
owner: "{{ docker_uid }}"
|
||||
group: "{{ docker_gid }}"
|
||||
mode: '0644'
|
||||
notify: Restart GitLab
|
||||
|
||||
- name: Deploy GitLab via Docker Compose
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: "{{ gitlab_base_path }}"
|
||||
state: present
|
||||
Reference in New Issue
Block a user