From b1ebc54438504962ae077a9a644d96ee10b3b8dc Mon Sep 17 00:00:00 2001 From: Alexander Grothe Date: Sun, 7 Jan 2018 17:55:18 +0100 Subject: [PATCH] Start xlogin@vdr after xorg.detect using a handler --- Manual.org | 9 +++++++++ handlers/main.yml | 8 ++++++++ roles/yavdr-xorg/tasks/detect-xorg.yml | 1 + 3 files changed, 18 insertions(+) diff --git a/Manual.org b/Manual.org index ae5db7a..595f7af 100644 --- a/Manual.org +++ b/Manual.org @@ -1818,6 +1818,7 @@ b'\xde\xad\xbe\xef' systemd: name: 'xlogin@{{ vdr.user }}.service' state: stopped + notify: ['xlogin_start'] - name: Stop x systemd: @@ -4774,6 +4775,14 @@ if __name__ == '__main__': enabled: yes register: xlogin_stop +- name: enable and start xlogin for the vdr user + systemd: + daemon_reload: yes + name: 'xlogin@{{ vdr.user }}' + enabled: yes + state: started + register: xlogin_start + - name: Stop x systemd: name: x@vt7.service diff --git a/handlers/main.yml b/handlers/main.yml index 71b1147..4c4741f 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -48,6 +48,14 @@ enabled: yes register: xlogin_stop +- name: enable and start xlogin for the vdr user + systemd: + daemon_reload: yes + name: 'xlogin@{{ vdr.user }}' + enabled: yes + state: started + register: xlogin_start + - name: Stop x systemd: name: x@vt7.service diff --git a/roles/yavdr-xorg/tasks/detect-xorg.yml b/roles/yavdr-xorg/tasks/detect-xorg.yml index d42e160..b16cdfb 100644 --- a/roles/yavdr-xorg/tasks/detect-xorg.yml +++ b/roles/yavdr-xorg/tasks/detect-xorg.yml @@ -22,6 +22,7 @@ systemd: name: 'xlogin@{{ vdr.user }}.service' state: stopped + notify: ['xlogin_start'] - name: Stop x systemd: