32
32
- libjasper1
33
33
- libwebp6
34
34
- libtiff5
35
+ - libconfig++9v5
35
36
36
37
- name : Install Python 3 pip
37
38
apt :
72
73
hdmi_group=1
73
74
hdmi_mode=62
74
75
state : present
76
+
77
+ - name : Identify as camera
78
+ copy :
79
+ src : piplatform.txt
80
+ dest : /boot/piplatform.txt
75
81
76
82
- name : SSH directory
77
83
file :
153
159
name : busybox-syslogd
154
160
state : latest
155
161
156
- # - name: fstab change (ro boot)
157
- # replace:
158
- # backup: no
159
- # dest: /etc/fstab
160
- # regexp: "^(.*vfat.*)defaults(?:,ro)?(.*)"
161
- # replace: "\\1defaults,ro\\2"
162
+ - name : fstab change (ro boot)
163
+ replace :
164
+ backup : no
165
+ dest : /etc/fstab
166
+ regexp : " ^(.*vfat.*)defaults(?:,ro)?(.*)"
167
+ replace : " \\ 1defaults,ro\\ 2"
162
168
163
- # - name: fstab change (ro rootfs)
164
- # replace:
165
- # backup: no
166
- # dest: /etc/fstab
167
- # regexp: "^(.*ext4.*)defaults(?:,ro)?(.*)"
168
- # replace: "\\1defaults,ro\\2"
169
+ - name : fstab change (ro rootfs)
170
+ replace :
171
+ backup : no
172
+ dest : /etc/fstab
173
+ regexp : " ^(.*ext4.*)defaults(?:,ro)?(.*)"
174
+ replace : " \\ 1defaults,ro\\ 2"
169
175
170
- # - name: fstab tmpfs
171
- # lineinfile:
172
- # path: /etc/fstab
173
- # line: "{{ item }}"
174
- # state: present
175
- # with_items:
176
- # - "tmpfs /tmp tmpfs nosuid,nodev 0 0"
177
- # - "tmpfs /var/log tmpfs nosuid,nodev 0 0"
178
- # - "tmpfs /var/tmp tmpfs nosuid,nodev 0 0"
176
+ - name : fstab tmpfs
177
+ lineinfile :
178
+ path : /etc/fstab
179
+ line : " {{ item }}"
180
+ state : present
181
+ with_items :
182
+ - " tmpfs /tmp tmpfs nosuid,nodev 0 0"
183
+ - " tmpfs /var/log tmpfs nosuid,nodev 0 0"
184
+ - " tmpfs /var/tmp tmpfs nosuid,nodev 0 0"
179
185
180
- # - name: Create dhcpcd.resolv.conf
181
- # copy:
182
- # src: /etc/resolv.conf
183
- # dest: /tmp/dhcpcd.resolv.conf
184
- # remote_src: yes
186
+ - name : Create dhcpcd.resolv.conf
187
+ copy :
188
+ src : /etc/resolv.conf
189
+ dest : /tmp/dhcpcd.resolv.conf
190
+ remote_src : yes
185
191
186
- # - name: Delete stuff
187
- # file:
188
- # path: "{{ item }}"
189
- # state: absent
190
- # with_items:
191
- # - /var/lib/dhcp
192
- # - /var/lib/dhcpcd5
193
- # - /var/spool
194
- # - /etc/resolv.conf
195
- # - /var/lib/systemd/random-seed
192
+ - name : Delete stuff
193
+ file :
194
+ path : " {{ item }}"
195
+ state : absent
196
+ with_items :
197
+ - /var/lib/dhcp
198
+ - /var/lib/dhcpcd5
199
+ - /var/spool
200
+ - /etc/resolv.conf
201
+ - /var/lib/systemd/random-seed
196
202
197
- # - name: Link stuff to tmpfs
198
- # file:
199
- # src: /tmp
200
- # dest: "{{ item }}"
201
- # state: link
202
- # with_items:
203
- # - /var/lib/dhcp
204
- # - /var/lib/dhcpcd5
205
- # - /var/spool
203
+ - name : Link stuff to tmpfs
204
+ file :
205
+ src : /tmp
206
+ dest : " {{ item }}"
207
+ state : link
208
+ with_items :
209
+ - /var/lib/dhcp
210
+ - /var/lib/dhcpcd5
211
+ - /var/spool
206
212
207
- # - name: Link dhcpcd.resolv.conf
208
- # file:
209
- # src: /tmp/dhcpcd.resolv.conf
210
- # dest: /etc/resolv.conf
211
- # state: link
213
+ - name : Link dhcpcd.resolv.conf
214
+ file :
215
+ src : /tmp/dhcpcd.resolv.conf
216
+ dest : /etc/resolv.conf
217
+ state : link
212
218
213
- # - name: Link random-seed
214
- # file:
215
- # src: /tmp/random-seed
216
- # dest: /var/lib/systemd/random-seed
217
- # state: link
218
- # force: yes
219
+ - name : Link random-seed
220
+ file :
221
+ src : /tmp/random-seed
222
+ dest : /var/lib/systemd/random-seed
223
+ state : link
224
+ force : yes
219
225
220
- # - name: Alter random-seed service
221
- # lineinfile:
222
- # dest: /lib/systemd/system/systemd-random-seed.service
223
- # line: ExecStartPre=/bin/echo "" >/tmp/random-seed
224
- # insertafter: RemainAfterExit=yes
226
+ - name : Alter random-seed service
227
+ lineinfile :
228
+ dest : /lib/systemd/system/systemd-random-seed.service
229
+ line : ExecStartPre=/bin/echo "" >/tmp/random-seed
230
+ insertafter : RemainAfterExit=yes
225
231
226
232
- name : Create raspindi
227
233
file :
353
359
url : https://github.com/raspberry-pi-camera/raspindi/raw/v{{ raspindi_version }}/etc/raspindi.conf.default
354
360
dest : /boot/raspindi.conf
355
361
362
+ - name : Set camera number
363
+ lineinfile :
364
+ path : /boot/raspindi.conf
365
+ regexp : " ^camera_number"
366
+ line : ' camera_number = "{{ cam_number }}";'
367
+
356
368
- name : Link config file
357
369
file :
358
370
src : /boot/raspindi.conf
368
380
- pix-plym-splash
369
381
state : present
370
382
371
- - name : Splash
383
+ - name : Create plymouth theme dir
384
+ file :
385
+ path : /usr/share/plymouth/themes/raspindi
386
+ state : directory
387
+
388
+ - name : Plymouth Theme
372
389
get_url :
373
- url : https://github.com/raspberry-pi-camera/raspindi/raw/v{{ raspindi_version }}/assets/splash.png
374
- dest : /usr/share/plymouth/themes/pix/splash.png
390
+ url : https://github.com/raspberry-pi-camera/plymouth-theme/raw/master/raspindi/{{ item }}
391
+ dest : /usr/share/plymouth/themes/raspindi/{{ item }}
392
+ with_items :
393
+ - raspindi.plymouth
394
+ - raspindi.script
395
+ - splash.png
396
+
397
+ - name : Set Plymouth Theme
398
+ shell :
399
+ cmd : plymouth-set-default-theme raspindi
400
+
401
+ - name : Create monitor server dir
402
+ file :
403
+ path : /opt/monitor-server/
404
+ state : directory
405
+
406
+ - name : Download montor server
407
+ unarchive :
408
+ src : https://github.com/raspberry-pi-camera/monitor-server/archive/master.tar.gz
409
+ remote_src : yes
410
+ extra_opts :
411
+ - ' --strip-components=1'
412
+ dest : /opt/monitor-server/
375
413
376
- - name : Shut down
377
- command : /sbin/shutdown -t now
378
- when : shutdown | default(True)
414
+ - name : Install dependencies
415
+ pip :
416
+ executable : /usr/bin/pip3
417
+ requirements : /opt/monitor-server/requirements.txt
418
+ state : present
419
+
420
+ - name : Monitor Server service
421
+ get_url :
422
+ url : https://github.com/raspberry-pi-camera/monitor-server/raw/master/monitor-server.service
423
+ dest : /etc/systemd/system/monitor-server.service
424
+
425
+ - name : Enable Monitor Server service
426
+ systemd :
427
+ daemon_reload : yes
428
+ name : monitor-server
429
+ enabled : yes
430
+
431
+ # - name: Shut down
432
+ # command: /sbin/shutdown -t now
433
+ # when: shutdown | default(True)
0 commit comments