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

- name: Create borg user on server
  user:
    name: borg
    group: borg
    shell: /bin/sh
    home: /srv/borg
    createhome: yes
    system: yes
    password: '*'

- 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
...