blob: 4bfa2f5c8dac8819c150adcf87938139db3f7dd6 (
plain) (
blame)
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
|
---
## Kodi only supports NFSv3, however it will probably work with Kodi 20+ (https://github.com/xbmc/xbmc/pull/21659)
- name: mount NFSv4 volumes
loop: "{{ kodi_config_nfs4_mounts }}"
loop_control:
label: "{{ item.src }} -> {{ item.path }}"
mount:
src: "{{ item.src }}"
path: "{{ item.path }}"
fstype: nfs4
opts: nodev,x-systemd.automount,nofail,ro
state: mounted
- name: install python lxml
apt:
name: "{{ python_basename }}-lxml"
state: present
- name: stop kodi
systemd:
name: kodi.service
state: stopped
## https://github.com/jose1711/kodi-ansible-role
- name: configure guisettings.xml
loop: "{{ kodi_config_guisettings | dict2items }}"
loop_control:
label: "{{ item.key }} = {{ item.value }}"
xml:
path: /home/kodi/.kodi/userdata/guisettings.xml
xpath: '/settings/setting[@id="{{ item.key }}"]'
value: "{{ item.value }}"
pretty_print: yes
- name: configure guisettings.xml - remove defaults
loop: "{{ kodi_config_guisettings | dict2items }}"
loop_control:
label: "{{ item.key }} = {{ item.value }}"
xml:
path: /home/kodi/.kodi/userdata/guisettings.xml
xpath: '/settings/setting[@id="{{ item.key }}"]/@default'
state: absent
pretty_print: yes
- name: generate sources.xml
template:
src: sources.xml.j2
dest: /home/kodi/.kodi/userdata/sources.xml
owner: kodi
group: kodi
- name: start kodi
systemd:
name: kodi.service
state: started
|