forked from fischerscode/Screenly-Ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaybook.yaml
70 lines (60 loc) · 1.68 KB
/
playbook.yaml
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
---
- name: "Setup pi"
hosts: all
vars_files:
- vars/secrets.yaml
vars:
screenly_repo: "https://github.com/Screenly/screenly-ose.git"
environment:
http_proxy: "{{ http_proxy }}"
https_proxy: "{{ http_proxy }}"
tasks:
- name: "Ensure pi-user has not the default password."
become: true
user:
name: "pi"
password: "{{ pi_password }}"
state: present
- name: "update all"
become: true
apt:
upgrade: dist
cache_valid_time: 3600
- name: "Ensure the right timezone is set"
become: true
timezone:
name: "Europe/Berlin"
- name: "HDMI settings"
lineinfile:
path: /boot/config.txt
regexp: "{{ item.regexp }}"
line: "{{ item.line }}"
state: present
with_items:
- { regexp: '^#\s*hdmi_force_hotplug.*$', line: 'hdmi_force_hotplug=1' }
- { regexp: '^#\s*disable_overscan.*$', line: 'disable_overscan=1' }
- { regexp: '^#\s*hdmi_group.*$', line: 'hdmi_group=1' }
- { regexp: '^#\s*hdmi_mode.*$', line: 'hdmi_mode={{ resolution }}' }
become: true
- name: "Install packages"
become: true
apt:
name: ["python-setuptools", "python-pip", "python-pyasn1", "git"]
state: present
autoclean: true
- name: clone Screenly repo
git:
repo: "{{ screenly_repo }}"
dest: /home/pi/screenly
version: "production"
update: true
- name: Install Screenly
import_playbook: screenly-ose-ansible/site.yml
- name: Install Redsocks
import_playbook: redsocks.yaml
- name: "Reboot"
hosts: all
tasks:
- name: "reboot"
become: true
reboot: