ansible-role-gitlab/tasks/main.yml

40 lines
819 B
YAML
Raw Normal View History

2020-04-11 13:16:20 +00:00
---
- name: add gpg key
2021-08-24 06:06:07 +00:00
ansible.builtin.apt_key:
2020-04-11 13:16:20 +00:00
url: https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey
tags: gitlab
- name: add repository
2021-08-24 06:06:07 +00:00
ansible.builtin.apt_repository:
2020-04-11 13:16:20 +00:00
repo: '{{ gitlab_repository }}'
tags: gitlab
- name: install package
2021-08-24 06:06:07 +00:00
ansible.builtin.package:
name:
- gitlab-ce
2020-04-11 13:16:20 +00:00
tags: gitlab
- name: copy config
2021-08-24 06:06:07 +00:00
ansible.builtin.template:
2020-04-11 13:16:20 +00:00
src: gitlab.rb.j2
dest: /etc/gitlab/gitlab.rb
owner: root
group: root
mode: 0600
notify: reconfigure gitlab
tags: gitlab
- name: init gitlab
2021-08-24 06:06:07 +00:00
ansible.builtin.command: gitlab-ctl reconfigure
2020-04-11 13:16:20 +00:00
args:
creates: /usr/lib/systemd/system/gitlab-runsvdir.service
tags: gitlab
- name: enable and start service
2021-08-24 06:06:07 +00:00
ansible.builtin.service:
2020-04-11 13:16:20 +00:00
name: gitlab-runsvdir
state: started
enabled: true
tags: gitlab