aboutsummaryrefslogtreecommitdiff
path: root/tasks/server.yml
blob: bd40dab948f186958c5f07ba959580dd8883aa92 (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
---
- name: Create borg group on server
  group:
    name: borg
    system: yes

- name: Create borg user on server
  user:
    name: borg
    shell: /bin/sh
    home: /srv/borg
    createhome: yes
    system: yes
    password_lock: yes

- name: Ensure borg directories exist on server
  file:
    state: directory
    path: "{{ item }}"
    owner: borg
    mode: 0700
  loop:
    - /srv/borg
    - /srv/borg/.ssh
    - /srv/borg/repos
...