-
Notifications
You must be signed in to change notification settings - Fork 0
/
kodi.yml
79 lines (79 loc) · 2.68 KB
/
kodi.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
77
78
79
# configure what we need to run kodi
---
- hosts: all
tasks:
- replace:
dest=/etc/network/interfaces
regexp='iface eth0 inet dhcp'
replace='iface eth0 inet static'
- lineinfile: dest=/etc/network/interfaces
line="address 192.168.1.10"
insertafter="iface eth0 inet static"
- lineinfile: dest=/etc/network/interfaces
line='netmask 255.255.255.0'
insertafter="iface eth0 inet static"
- lineinfile: dest=/etc/network/interfaces
line='gateway 192.168.1.254'
insertafter="iface eth0 inet static"
- lineinfile: dest=/etc/network/interfaces
line='dns-nameservers 8.8.8.8'
insertafter="iface eth0 inet static"
- lineinfile: dest=/etc/network/interfaces
line='dns-search example.com'
insertafter="iface eth0 inet static"
#
# optional for bare metal restore
#
# - lineinfile:
# dest=/etc/fstab
# line='192.168.1.1:/volume1/backup-kodi /backup nfs rw,noauto 0 0'
# backup=yes
# - name: Create /backup
# file: path=/backup state=directory
- name: Install software-properties-common
apt: pkg=software-properties-common state=installed
- name: Add kodi repo
apt_repository: repo='ppa:team-xbmc/ppa' state=present update_cache=true
- name: install kodi and dependencies
apt: pkg={{item}} state=installed
with_items:
- nfs-common
- kodi
- x11-common
- xserver-xorg-legacy
- xorg
- dbus-x11
- policykit-1
- replace:
dest=/etc/X11/Xwrapper.config
regexp='console'
replace='anybody'
- lineinfile:
dest=/etc/X11/Xwrapper.config
line='needs_root_rights=yes'
- lineinfile:
dest=/etc/modprobe.d/blacklist.conf
line='blacklist ite_cir'
- lineinfile:
dest=/etc/lirc/lircd.conf
line='include "/usr/share/lirc/remotes/mceusb/lircd.conf.mceusb"'
- replace:
dest=/etc/lirc/hardware.conf
regexp='REMOTE_MODULES=""'
replace='REMOTE_MODULES="lirc_dev mceusb"'
- replace:
dest=/etc/lirc/hardware.conf
regexp='REMOTE_LIRCD_CONF=""'
replace='REMOTE_LIRCD_CONF="mceusb/lircd.conf.mceusb"'
- replace:
dest=/etc/lirc/hardware.conf
regexp='REMOTE_DEVICE=""'
replace='REMOTE_DEVICE="/dev/lirc0"'
- replace:
dest=/etc/lirc/hardware.conf
regexp='START_LIRCD="false"'
replace='START_LIRCD="true"'
- name: add kodi user to groups
user: name=kodi
groups=cdrom,audio,video,plugdev,users,dialout,dip,input
append=yes