summaryrefslogtreecommitdiff
path: root/ansible/roles/holywood2/tasks/main.yml
blob: f62f302ee095cab1f6b8fc9eaf8bb1908882eb94 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
- name: install root SSH config into /home/root/.ssh
  copy:
    src: ssh-config
    dest: /home/root/.ssh/config

- name: install root SSH authorized keys into /home/root/.ssh
  copy:
    src: ssh-config
    dest: /home/root/.ssh/config

- name: symlink /root/.ssh to /home/root/.ssh
  file:
    state: link
    src: /home/root/.ssh
    path: /root/.ssh

- name: create soile group
  group:
    name: soile
    gid: 501

- name: create soile account
  user:
    name: soile
    comment: Soile Mottisenkangas
    createhome: no
    group: soile
    uid: 501

- name: install NFS server
  apt:
    name: nfs-kernel-server

- name: install /etc/exports
  copy:
    src: exports
    dest: /etc/exports
    owner: root
    group: root
    mode: 0644

- name: enable statd
  systemd:
    name: rpc-statd
    state: started
    enabled: yes

# - name: install borg
#   apt:
#     name: borgbackup
# #    default_release: stretch-backports

# - name: install borg scripting
#   copy:
#     src: "{{ item }}"
#     dest: /root
#     owner: root
#     group: root
#     mode: 0755
#   with_items:
#     - run-borg
#     - borg-all

# - name: install borg passphrase
#   copy:
#     content: "{{ lookup('pipe', 'pass borg/holywood2-to-willikins') }}"
#     dest: /etc/borg-passphrase
#     owner: root
#     group: root
#     mode: 0600

# - name: run borg from cron
#   copy:
#     content: |
#       40 10 * * * root /root/borg-all
#     dest: /etc/cron.d/local-backup
#     owner: root
#     group: root
#     mode: 0755