yavdr-ansible/roles/yavdr-xorg/tasks/main.yml

83 lines
1.8 KiB
YAML
Raw Normal View History

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
- name: Stop VDR
systemd:
name: vdr.service
state: stopped
enabled: yes
notify: ['Start VDR']
- 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
- 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
- read-edid
2017-04-10 13:24:40 +02:00
#- yavdr-xorg
- name: Stop xlogin
2017-04-10 13:24:40 +02:00
systemd:
name: xlogin@vdr.service
state: stopped
2017-07-16 08:16:25 +02:00
enabled: yes
- 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
# 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)
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