summaryrefslogtreecommitdiff
path: root/ansible/obnam-server.yml
blob: 110dccedab9784901b9d1596167fb6eabb066039 (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
28
29
30
31
32
33
34
35
36
37
38
39
- hosts: obnam-server
  remote_user: root
  tasks:
    - file:
        path: /etc/obnam
        state: directory
    - file:
        path: /srv/obnam/chunks
        state: directory
    - filesystem:
        dev: "{{ chunkdev }}"
        fstype: ext4
        opts: -Lchunks
    - mount:
        src: LABEL=chunks
        path: /srv/obnam/chunks
        fstype: auto
        state: mounted
    - apt_repository:
        repo: "deb [trusted=yes]  http://ci-prod-controller.vm.liw.fi/debian unstable-ci main"
    - apt:
        name: obnam
    - copy:
        src: obnam.service
        dest: /etc/systemd/system/obnam.service
    - copy:
        src: "{{ item }}"
        dest: "/etc/obnam/{{ item }}"
      with_items:
        - server.yaml
        - server.key
        - server.pem
    - systemd:
        name: obnam
        enabled: true
        state: restarted
        daemon_reload: true
  vars:
    chunkdev: /dev/vdb