-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit-raspiator.yml
75 lines (60 loc) · 1.92 KB
/
init-raspiator.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
67
68
69
70
71
72
73
74
75
# Initialize raspiator client
# vim:ff=unix ts=2 sw=2 ai expandtab
# TODO: Change SSH login only to use keys
---
- hosts: init-radiators
sudo: yes
tasks:
- name: update apt cache
command: apt-get update
- name: install python-apt
command: apt-get install python-apt -y
- name: remove unnecessary packages
apt: name={{ item }} state=absent
with_items:
- scratch
- smartsim
- wolfram-engine
- name: upgrade system
command: apt-get upgrade -y
- name: install dependencies and ansible apt support
apt: name={{ item }} state=present
with_items:
- matchbox
- chromium
- x11-xserver-utils
- ttf-mscorefonts-installer
- xwit
- sqlite3
- libnss3
- xdotool
- watchdog
# I wonder if this works...
- name: install watchdog
actions:
- linefile: dest=/etc/modules line=bcm2708_wdog state=present
- modprobe: name=bcm2708_wdog state=present
- shell: update-rc.d watchdog defaults
- lineinfile: dest=/etc/watchdog.conf create=yes line=max-load-1 state=present
- lineinfile: dest=/etc/watchdog.conf create=yes line=watchdog-device state=present
- service: name=watchdog state=started enabled=yes
- name: install radiator package
sudo: no
git:
repo=https://github.com/llauren/raspiator.git
dest=/home/pi/raspiator
- name: screen saver execute bit
sudo: no
file: name="/home/pi/raspiator/client/screensaver-control" mode=0744
- name: change ownership of xinitrc
file: path=/home/pi/raspiator/client/xinitrc owner=root group=root
- name: move xinitrc
command: mv /home/pi/raspiator/client/xinitrc /boot/xinitrc
- name: create user link to xinitrc
file: src=/boot/xinitrc dest=/home/pi/.xinitrc state=link owner=pi
- name: move rc.local to etc
command: mv /home/pi/raspiator/client/rc-local /etc/rc.local
notify: reboot radiator
handlers:
- name: reboot radiator
command: reboot