2017-07-16 11:05:54 +02:00
|
|
|
---
|
|
|
|
# file: roles/yavdr-xorg/tasks/desktop-session.yml
|
|
|
|
|
|
|
|
- name: create folders for user configuration files
|
|
|
|
file:
|
|
|
|
state: directory
|
|
|
|
dest: '{{ item }}'
|
|
|
|
mode: '0775'
|
|
|
|
owner: '{{ vdr.user }}'
|
|
|
|
group: '{{ vdr.group }}'
|
|
|
|
with_items:
|
|
|
|
- '{{ vdr.home }}/.config/systemd/user'
|
|
|
|
- '{{ vdr.home }}/.config/openbox'
|
|
|
|
- '{{ vdr.home }}/.config/pulse'
|
|
|
|
|
|
|
|
- name: expand template for .xinitrc for vdr user
|
|
|
|
template:
|
|
|
|
src: 'templates/.xinitrc.j2'
|
|
|
|
dest: '{{ vdr.home }}/.xinitrc'
|
|
|
|
mode: 0755
|
|
|
|
owner: '{{ vdr.user }}'
|
|
|
|
group: '{{ vdr.group }}'
|
|
|
|
|
|
|
|
- name: expand template for openbox autostart
|
|
|
|
template:
|
|
|
|
src: 'templates/openbox/autostart.j2'
|
|
|
|
dest: '{{ vdr.home }}/.config/openbox/autostart'
|
|
|
|
mode: 0755
|
|
|
|
owner: '{{ vdr.user }}'
|
|
|
|
group: '{{ vdr.group }}'
|
|
|
|
|
|
|
|
- name: expand rc.xml for openbox
|
|
|
|
template:
|
|
|
|
src: 'templates/openbox/rc.xml.j2'
|
|
|
|
dest: '{{ vdr.home }}/.config/openbox/rc.xml'
|
2017-07-31 08:44:27 +02:00
|
|
|
mode: 0644
|
2017-07-16 11:05:54 +02:00
|
|
|
owner: '{{ vdr.user }}'
|
|
|
|
group: '{{ vdr.group }}'
|
|
|
|
|
|
|
|
- name: create yavdr-desktop.target for the user session
|
|
|
|
template:
|
|
|
|
src: 'templates/systemd/user/yavdr-desktop.target.j2'
|
|
|
|
dest: '{{ vdr.home }}/.config/systemd/user/yavdr-desktop.target'
|
2017-07-31 08:44:27 +02:00
|
|
|
mode: 0644
|
2017-07-16 11:05:54 +02:00
|
|
|
owner: '{{ vdr.user }}'
|
|
|
|
group: '{{ vdr.group }}'
|
|
|
|
|
|
|
|
- name: disable pulseaudio autospawning
|
|
|
|
lineinfile:
|
|
|
|
path: '{{ vdr.home }}/.config/pulse/client.conf'
|
|
|
|
line: 'autospawn = no'
|
|
|
|
create: yes
|
|
|
|
state: present
|
|
|
|
owner: '{{ vdr.user }}'
|
|
|
|
group: '{{ vdr.group }}'
|
|
|
|
|
|
|
|
- name: create tmux.service for the session
|
|
|
|
template:
|
|
|
|
src: roles/yavdr-xorg/templates/systemd/user/tmux.service.j2
|
|
|
|
dest: '{{ vdr.home }}/.config/systemd/user/tmux.service'
|
2017-07-16 11:21:04 +02:00
|
|
|
|
|
|
|
- name: create detect-second-display.service for the session
|
|
|
|
template:
|
|
|
|
src: templates/systemd/user/detect-second-display.service.j2
|
|
|
|
dest: '{{ vdr.home }}/.config/systemd/user/detect-second-display.service'
|
|
|
|
|
|
|
|
- name: create openbox-second.service for the session
|
|
|
|
template:
|
|
|
|
src: templates/systemd/user/openbox-second.service.j2
|
|
|
|
dest: '{{ vdr.home }}/.config/systemd/user/openbox-second.service'
|
|
|
|
|
|
|
|
- name: create osd2web.service for the session
|
|
|
|
template:
|
|
|
|
src: templates/systemd/user/osd2web.service.j2
|
|
|
|
dest: '{{ vdr.home }}/.config/systemd/user/osd2web.service'
|
2017-07-30 23:09:58 +02:00
|
|
|
|
|
|
|
- name: link /usr/bin/start-desktop to /var/lib/vdr/plugins/desktop/starter
|
|
|
|
file:
|
|
|
|
src: /usr/bin/start-desktop
|
|
|
|
dest: /var/lib/vdr/plugins/desktop/starter
|
|
|
|
state: link
|
|
|
|
|
2017-07-30 23:28:13 +02:00
|
|
|
- name: enable and start xlogin for the vdr user
|
2017-07-30 23:19:35 +02:00
|
|
|
systemd:
|
|
|
|
daemon_reload: yes
|
|
|
|
name: 'xlogin@{{ vdr.user }}'
|
|
|
|
enabled: yes
|
|
|
|
state: started
|