ansible-role-gitlab/tasks/main.yml

39 lines
715 B
YAML
Raw Normal View History

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