-
Notifications
You must be signed in to change notification settings - Fork 0
/
doorbot1.yml
34 lines (32 loc) · 893 Bytes
/
doorbot1.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
---
- name: DoES Liverpool doorbot on a Raspberry Pi
hosts: doorbot1-pi
vars:
pi_name: doorbot1
ansible_port: 2223
pi_password:
- protected_scripts/doorbot1-pwd.txt
remote_user: pi
become: yes
become_method: sudo
roles:
- { role: base-doorbot, pi_name="doorbot1" }
- { role: screen, pi_name="doorbot1" }
pre_tasks:
- name: Update apt
apt: upgrade=dist update_cache=yes
become: true
tasks:
- name: Rotate the display
blockinfile:
dest: /boot/config.txt
block: |
# Portrait mode for the display
display_rotate=3
- name: Ensure we have the volume turned up to max
command: amixer cset numid=1 -- 400
- name: Reboot the pi to check it comes up cleanly
command: sleep 2 && shutdown -r now "Ansible updates triggered"
async: 1
poll: 0
ignore_errors: true