add gitlab
This commit is contained in:
parent
4e62432a58
commit
82e2cdb355
7 changed files with 147 additions and 0 deletions
22
roles/gitlab/tasks/base.yml
Normal file
22
roles/gitlab/tasks/base.yml
Normal file
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
|
||||
- name: Check gitlab directory exist
|
||||
ansible.builtin.file:
|
||||
path: gitlab
|
||||
state: directory
|
||||
|
||||
- name: Copy template conf
|
||||
ansible.builtin.template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "gitlab/{{ item.dest }}"
|
||||
loop:
|
||||
- { src: 'docker-compose.yml', dest: 'docker-compose.yml' }
|
||||
register: gitlab_copy_templates_results
|
||||
|
||||
- name: Update and restart container
|
||||
community.docker.docker_compose:
|
||||
project_src: gitlab
|
||||
state: present
|
||||
pull: true
|
||||
restarted: "{{ gitlab_copy_templates_results.changed }}"
|
||||
become: true
|
Loading…
Add table
Add a link
Reference in a new issue