summaryrefslogtreecommitdiff
path: root/ansible/roles/holywood2/tasks/main.yml
blob: 1da48db43ff28a1a973532644ab79cccbad8c759 (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
- 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
  notify: restart_nfsd

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

- name: install backup scripting
  copy:
    src: "{{ item }}"
    dest: /root
    owner: root
    group: root
    mode: 0755
  with_items:
    - rsync-to-nalanda
    - rsync-to-nalanda-all

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