-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup-rpi.yml
76 lines (64 loc) · 2.02 KB
/
setup-rpi.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
76
- hosts:
rpi
vars:
kodi_addons_directory: "/usr/share/kodi/addons/"
pi_home: /home/pi
git_dir: "{{ pi_home }}/git"
rpi_media_center_prereq_packages:
- apt-transport-https
- kodi-inputstream-adaptive
- git
# - libwidevine
raspotify_repo: "deb https://dtcooper.github.io/raspotify raspotify main"
raspotify_key: "https://dtcooper.github.io/raspotify/key.asc"
raspotify_packages:
- raspotify
addon_repository_urls:
- https://github.com/castagnait/repository.castagnait/raw/master/repository.castagnait-1.0.0.zip
- http://fusion.tvaddons.co/kodi-repos/english/repository.zachmorris-1.0.0.zip
git_repositories:
- name: RetroPie-Setup
repo: https://github.com/RetroPie/RetroPie-Setup.git
roles:
- name: ansible-kodi-raspbian
memory_split: 256
tasks:
- name: Installer les prerequis
apt:
pkg: "{{ rpi_media_center_prereq_packages }}"
state: present
- name: Installer le repo de raspotify
apt_repository:
repo: "{{ raspotify_repo }}"
state: present
- name: Installer la clé du repo raspotify
apt_key:
url: "{{ raspotify_key }}"
state: present
- name: Installer raspotify
apt:
pkg: "{{ raspotify_packages }}"
- name: Installer pycryptodomex pour le user pi pour Netflix.
pip:
name: pycryptodomex
extra_args: --user
become: False
- name: Télécharger les repository pour supplémentaires
unarchive:
src: "{{ item }}"
dest: "{{ kodi_addons_directory }}"
remote_src: yes
with_items: "{{ addon_repository_urls }}"
- name: Créer le répertoire pour les dépôts git
file:
path: "{{ git_dir }}"
owner: pi
group: pi
mode: 0755
state: directory
- name: Cloner les dépôts git
git:
dest: "{{ git_dir }}/{{ item.name }}"
depth: 1
repo: "{{ item.repo }}"
with_items: "{{ git_repositories }}"