summaryrefslogtreecommitdiff
path: root/roles/repo_service/tasks/main.yaml
blob: 19139e0884c1262359067dc07fbe4ab23bfa50c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
---
- name: Create repo_service group
  group: name=repo_service

- name: Create repo_service user
  user:
    name=repo_service
    group=repo_service
    home=/var/lib/repo_service

- include: as_repo_service.yaml
  become: yes
  become_user: repo_service
  become_method: su

- name: Create systemd service
  copy:
    src=repo_service.service
    dest=/etc/systemd/system/repo_service.service
  notify:
  - Reload systemd daemons
  - Restart repo_service

- name: Enable systemd service
  service:
    name: repo_service
    enabled: yes