2017-08-31 15:55:04 +02:00
|
|
|
---
|
|
|
|
# file: roles/yavdr-xorg/tasks/setup-xorg.yml
|
2017-07-31 10:38:02 +02:00
|
|
|
- name: create directories for systemd drop-in files
|
2017-07-30 14:29:38 +02:00
|
|
|
file:
|
2017-07-31 10:38:02 +02:00
|
|
|
dest: '{{ item }}'
|
2017-07-30 14:29:38 +02:00
|
|
|
state: directory
|
2017-07-31 10:38:02 +02:00
|
|
|
with_items:
|
2017-11-21 11:30:03 +01:00
|
|
|
- "/etc/systemd/system/x@.service.d/"
|
|
|
|
- "/etc/systemd/system/vdr.service.d/"
|
|
|
|
- "/etc/systemd/system/user@{{ vdr.uid }}.service.d/"
|
2017-12-17 10:38:12 +01:00
|
|
|
- "/etc/X11/xorg.conf.d/"
|
|
|
|
|
2017-12-17 11:07:40 +01:00
|
|
|
- name: command | write keyboard configuration to /etc/X11/xorg.conf.d/00-keyboard.conf
|
|
|
|
command: write-x11-keyboard-config
|
2017-12-17 11:28:47 +01:00
|
|
|
creates: /etc/X11/xorg.conf.d/00-keyboard.conf
|
2017-12-17 11:31:53 +01:00
|
|
|
# NOTE: write-x11-keyboard-config is in the xlogin package
|
|
|
|
# Ubuntu's systemd is patched, so it does not create the file automatically
|
2017-07-30 14:29:38 +02:00
|
|
|
|
2017-11-22 08:11:56 +01:00
|
|
|
- name: systemd-drop-in | add dependency to X-server for vdr.service
|
2017-07-30 14:29:38 +02:00
|
|
|
template:
|
|
|
|
src: templates/vdr-xorg.conf
|
|
|
|
dest: /etc/systemd/system/vdr.service.d/vdr-xorg.conf
|
|
|
|
|
2017-11-22 08:11:56 +01:00
|
|
|
- name: systemd-drop-in | start x@.service before xlogin@.service
|
2017-07-31 10:38:02 +02:00
|
|
|
template:
|
|
|
|
src: templates/x@service.d/xlogin.conf.j2
|
|
|
|
dest: /etc/systemd/system/x@.service.d/xlogin.conf
|
|
|
|
|
2017-11-22 08:11:56 +01:00
|
|
|
- name: systemd-drop-in | load environment file for vdr.service
|
2017-07-30 14:29:38 +02:00
|
|
|
template:
|
|
|
|
src: templates/systemd/vdr-environ.j2
|
|
|
|
dest: /etc/systemd/system/vdr.service.d/load-environ.conf
|
|
|
|
|
2017-12-17 10:38:12 +01:00
|
|
|
- name: systemd-drop-in | start vdr.service after network-online.target
|
|
|
|
template:
|
|
|
|
src: templates/systemd/network-online.j2
|
|
|
|
dest: /etc/systemd/system/vdr.service.d/network-online.conf
|
|
|
|
|
2017-11-22 08:11:56 +01:00
|
|
|
- name: systemd-drop-in | user@{{ vdr.uid }}.service depends on x@vt7.service
|
2017-07-31 11:45:33 +02:00
|
|
|
template:
|
2017-07-31 11:52:04 +02:00
|
|
|
src: templates/user@666.service.d/x-dependency.conf.j2
|
2017-07-31 11:45:33 +02:00
|
|
|
dest: '/etc/systemd/system/user@{{ vdr.uid }}.service.d/x-dependency.conf'
|
|
|
|
|
2017-11-22 08:11:56 +01:00
|
|
|
- name: vdr-config | start softhddevice detached and set audio to pulseaudio
|
2017-07-31 08:22:05 +02:00
|
|
|
lineinfile:
|
|
|
|
path: /etc/vdr/conf.avail/softhddevice.conf
|
2017-12-17 11:37:28 +01:00
|
|
|
line: '{{ item }}'
|
2017-07-31 08:22:05 +02:00
|
|
|
with_items:
|
|
|
|
- '-D'
|
|
|
|
# - '-a pulse' # do we need this with our existing asound.conf?
|
|
|
|
|
2017-11-21 11:30:03 +01:00
|
|
|
- name: add a login shell for the user vdr
|
2017-07-30 14:29:38 +02:00
|
|
|
user:
|
|
|
|
name: '{{ vdr.user }}'
|
|
|
|
shell: '/bin/bash'
|
|
|
|
state: present
|
|
|
|
uid: '{{ vdr.uid }}'
|
|
|
|
groups: '{{ vdr.group }}'
|
|
|
|
append: yes
|
|
|
|
|
2017-11-09 10:37:06 +01:00
|
|
|
- name: apt | install packages for xorg
|
2017-07-30 14:29:38 +02:00
|
|
|
apt:
|
|
|
|
name: '{{ item }}'
|
|
|
|
state: present
|
|
|
|
with_items:
|
2017-11-09 09:51:16 +01:00
|
|
|
- xlogin
|
2017-07-30 14:29:38 +02:00
|
|
|
- xorg
|
|
|
|
- xserver-xorg-input-all
|
2017-11-09 09:51:16 +01:00
|
|
|
- xserver-xorg-video-all
|
2017-07-30 14:29:38 +02:00
|
|
|
- openbox
|
2017-07-30 15:21:05 +02:00
|
|
|
- python3-dbus2vdr
|
2017-07-30 14:29:38 +02:00
|
|
|
- python3-yavdrfrontend
|
2017-11-09 09:51:16 +01:00
|
|
|
- read-edid
|
|
|
|
- tmux
|
2017-07-30 21:55:48 +02:00
|
|
|
- vdr-plugin-desktop
|
2017-12-17 10:02:09 +01:00
|
|
|
- vdr-plugin-osd2web
|
2017-11-09 10:37:06 +01:00
|
|
|
#- yavdr-xorg
|
|
|
|
|
|
|
|
- name: apt | install desktop programs
|
|
|
|
apt:
|
|
|
|
name: '{{ item }}'
|
|
|
|
state: present
|
|
|
|
with_items:
|
2017-11-09 09:51:16 +01:00
|
|
|
- xterm
|
|
|
|
- firefox
|
|
|
|
- kiosk-browser
|