2017-02-19 13:56:47 +01:00
|
|
|
---
|
2017-02-22 15:27:48 +01:00
|
|
|
# file: roles/yavdr-xorg/tasks/main.yml
|
2017-02-19 13:56:47 +01:00
|
|
|
|
2017-07-16 11:05:54 +02:00
|
|
|
# IDEA: use hooks or requirements instead
|
2017-06-20 15:09:15 +02:00
|
|
|
- name: Stop VDR
|
|
|
|
systemd:
|
|
|
|
name: vdr.service
|
|
|
|
state: stopped
|
|
|
|
enabled: yes
|
|
|
|
notify: ['Start VDR']
|
|
|
|
|
2017-06-22 13:29:57 +02:00
|
|
|
- name: create directory /etc/systemd/system/vdr.service.d/
|
|
|
|
file:
|
|
|
|
dest: /etc/systemd/system/vdr.service.d/
|
|
|
|
state: directory
|
|
|
|
|
2017-07-16 11:05:54 +02:00
|
|
|
- name: add dependency to X-server for vdr.service using a drop-in
|
|
|
|
template:
|
|
|
|
src: templates/vdr-xorg.conf
|
|
|
|
dest: /etc/systemd/system/vdr.service.d/vdr-xorg.conf
|
|
|
|
|
2017-07-16 11:21:04 +02:00
|
|
|
- name: load environment file for vdr.service
|
|
|
|
template:
|
|
|
|
src: templates/systemd/vdr-environ.j2
|
|
|
|
dest: /etc/systemd/system/vdr.service.d/load-environ.conf
|
|
|
|
|
2017-07-16 11:05:54 +02:00
|
|
|
- name: set a login shell for the user vdr
|
|
|
|
user:
|
|
|
|
name: '{{ vdr.user }}'
|
|
|
|
shell: '/bin/bash'
|
|
|
|
state: present
|
|
|
|
uid: '{{ vdr.uid }}'
|
|
|
|
groups: '{{ vdr.group }}'
|
|
|
|
append: yes
|
|
|
|
|
2017-02-22 15:27:48 +01:00
|
|
|
- name: install packages for xorg
|
2017-02-19 13:56:47 +01:00
|
|
|
apt:
|
2017-02-22 15:27:48 +01:00
|
|
|
name: '{{ item }}'
|
|
|
|
state: present
|
2017-02-19 13:56:47 +01:00
|
|
|
with_items:
|
2017-02-22 15:27:48 +01:00
|
|
|
- xorg
|
|
|
|
- xserver-xorg-video-all
|
|
|
|
- xserver-xorg-input-all
|
|
|
|
- xlogin
|
|
|
|
- xterm
|
|
|
|
- openbox
|
2017-06-21 12:46:51 +02:00
|
|
|
- tmux
|
|
|
|
- kiosk-browser
|
2017-07-08 13:37:35 +02:00
|
|
|
- read-edid
|
2017-04-10 13:24:40 +02:00
|
|
|
#- yavdr-xorg
|
|
|
|
|
2017-07-16 08:02:25 +02:00
|
|
|
- name: Stop xlogin
|
2017-04-10 13:24:40 +02:00
|
|
|
systemd:
|
2017-07-16 08:02:25 +02:00
|
|
|
name: xlogin@vdr.service
|
|
|
|
state: stopped
|
2017-07-16 08:16:25 +02:00
|
|
|
enabled: yes
|
2017-07-16 08:02:25 +02:00
|
|
|
|
|
|
|
- name: Stop x
|
|
|
|
systemd:
|
|
|
|
name: x@vt7.service
|
2017-04-10 13:24:40 +02:00
|
|
|
state: stopped
|
|
|
|
|
2017-07-16 11:05:54 +02:00
|
|
|
- include: detect-xorg.yml
|
2017-04-10 13:24:40 +02:00
|
|
|
|
2017-07-15 14:28:23 +02:00
|
|
|
# TODO: expand template for xorg.conf (or snippets)
|
|
|
|
# with respect for the available graphics card driver
|
|
|
|
# nvidia, noveau, intel, radeon
|
|
|
|
|
|
|
|
- name: create xorg.conf (for nvidia driver)
|
2017-07-08 13:37:35 +02:00
|
|
|
template:
|
|
|
|
src: templates/xorg.conf.j2
|
|
|
|
dest: /etc/X11/xorg.conf
|
|
|
|
backup: yes
|
2017-02-22 15:27:48 +01:00
|
|
|
|
2017-07-16 11:05:54 +02:00
|
|
|
- include: desktop-session.yml
|
2017-06-21 12:46:51 +02:00
|
|
|
|
2017-03-13 15:27:21 +01:00
|
|
|
- name: enable and start xlogin for the user vdr
|
2017-02-22 15:27:48 +01:00
|
|
|
systemd:
|
|
|
|
daemon_reload: yes
|
|
|
|
name: 'xlogin@{{ vdr.user }}'
|
|
|
|
enabled: yes
|
|
|
|
state: started
|