-
Notifications
You must be signed in to change notification settings - Fork 1
/
playbook.yml
66 lines (56 loc) · 1.53 KB
/
playbook.yml
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
---
- hosts: pi
roles:
- role: drew-kun.rpi_expandfs
tags: rpi_expandfs
- role: systemli.sshd
tags: sshd
when: ssh_key is defined
- role: systemli.onion
tags: onion
when: ssh_key is defined
tasks:
- name: Add public ssh key
authorized_key:
user: pi
key: "{{ lookup('file', '{{ ssh_key }}') }}"
when: ssh_key is defined
- name: Mount external HDD
mount:
path: /srv
src: "{{ hdd }}"
fstype: ext4
opts: noatime,noexec,nosuid
state: mounted
when: hdd is defined
- name: External HDD is owned by pi
file:
path: /srv
state: directory
recurse: true
owner: pi
when: hdd is defined
- name: Install packages
apt:
name: "{{ packages }}"
state: present
- name: Uninstall watchdog daemon
apt:
name: watchdog
state: absent
tags: watchdog
- name: Configure systemd watchdog
lineinfile:
path: /etc/systemd/system.conf
regexp: "#?RuntimeWatchdogSec"
line: "RuntimeWatchdogSec=20"
tags: watchdog
- hosts: pi
roles:
- { role: jnv.unattended-upgrades, tags: unattended_upgrades }
- { role: chmduquesne.transmission, tags: transmission }
- { role: tschifftner.samba, tags: samba }
- { role: t2d.raspotify, tags: raspotify }
- { role: t2d.hifiberry, tags: hifiberry, when: hifiberry_enabled|bool }
- { role: t2d.mopidy, tags: mopidy }
- { role: t2d.tmux, tags: tmux }