From ba1d276d564c05db1074dd3283d72183439a955d Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Thu, 13 Sep 2018 14:41:00 +0000 Subject: [PATCH] display setup --- tasks/main.yml | 10 +++++++++- templates/display-setup.sh.j2 | 3 +++ templates/lightdm.conf.j2 | 3 +++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 templates/display-setup.sh.j2 diff --git a/tasks/main.yml b/tasks/main.yml index f8e3700..ec1ed88 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -40,7 +40,15 @@ template: src: lightdm-gtk-greeter.conf.j2 dest: /etc/lightdm/lightdm-gtk-greeter.conf - #notify: restart lightdm + notify: restart lightdm + +- name: lightdm display setup script + template: + src: display-setup.sh.j2 + dest: /etc/lightdm/display-setup.sh + mode: u=rwx,g=rx,o=rx + when: display_setup_commands is defined + notify: restart lightdm - name: download background image get_url: diff --git a/templates/display-setup.sh.j2 b/templates/display-setup.sh.j2 new file mode 100644 index 0000000..acd05a1 --- /dev/null +++ b/templates/display-setup.sh.j2 @@ -0,0 +1,3 @@ +#!/bin/sh + +{{ display_setup_commands | join("\n") }} diff --git a/templates/lightdm.conf.j2 b/templates/lightdm.conf.j2 index 7061d3c..6fb4a07 100644 --- a/templates/lightdm.conf.j2 +++ b/templates/lightdm.conf.j2 @@ -82,6 +82,9 @@ autologin-user-timeout=0 user-session=mainentance {% endif %} +{% if display_setup_commands is defined %} +display-setup-script=/etc/lightdm/display-setup.sh +{% endif %} # # XDMCP Server configuration #