diff options
author | Christian Pointner <equinox@spreadspace.org> | 2020-12-23 15:04:52 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2020-12-27 19:41:02 +0100 |
commit | db6c8ad04d9cff24f1d65ac7fd7635fa20fd8e37 (patch) | |
tree | f878df8832b91c58e32ec7223ce54f6f0cdef28f /roles/ws/base/tasks | |
parent | cosmetic changes (diff) |
ws/base: allow configuration of lightdm
Diffstat (limited to 'roles/ws/base/tasks')
-rw-r--r-- | roles/ws/base/tasks/lightdm.yml | 44 | ||||
-rw-r--r-- | roles/ws/base/tasks/main.yml | 20 |
2 files changed, 46 insertions, 18 deletions
diff --git a/roles/ws/base/tasks/lightdm.yml b/roles/ws/base/tasks/lightdm.yml new file mode 100644 index 00000000..0b90cdc1 --- /dev/null +++ b/roles/ws/base/tasks/lightdm.yml @@ -0,0 +1,44 @@ +--- +- name: install lightdm default config + when: ws_base_lightdm_defaults is defined + copy: + content: | + [Seat:*] + {% for option, value in ws_base_lightdm_defaults.items() %} + {{ option }}={{ value }} + {% endfor %} + dest: /etc/lightdm/lightdm.conf.d/defaults.conf + ## not restarting lightdm because this would logg-off any logged in user! + +- name: remove lightdm default config + when: ws_base_lightdm_defaults is not defined + file: + path: /etc/lightdm/lightdm.conf.d/defaults.conf + state: absent + ## not restarting lightdm because this would logg-off any logged in user! + + +- name: install xrandr setup script + when: ws_base_xrandr_setup_script is defined + block: + - name: install xrandr setup script + copy: + content: "{{ ws_base_xrandr_setup_script }}" + dest: /usr/local/bin/xrandr-setup.sh + mode: 0755 + + - name: install xrandr setup script + copy: + content: | + [Seat:*] + greeter-setup-script=/usr/local/bin/xrandr-setup.sh + session-setup-script=/usr/local/bin/xrandr-setup.sh + dest: /etc/lightdm/lightdm.conf.d/xrandr-setup.conf + ## not restarting lightdm because this would logg-off any logged in user! + +- name: remove xrandr setup script config + when: ws_base_xrandr_setup_script is not defined + file: + path: /etc/lightdm/lightdm.conf.d/xrandr-setup.conf + state: absent + ## not restarting lightdm because this would logg-off any logged in user! diff --git a/roles/ws/base/tasks/main.yml b/roles/ws/base/tasks/main.yml index 75263844..579df707 100644 --- a/roles/ws/base/tasks/main.yml +++ b/roles/ws/base/tasks/main.yml @@ -79,21 +79,5 @@ when: ws_base_hide_ntfs_disks is defined import_tasks: hide-ntfs-disks.yml - -- name: install xrandr setup script - when: ws_base_xrandr_setup_script is defined - block: - - name: install xrandr setup script - copy: - content: "{{ ws_base_xrandr_setup_script }}" - dest: /usr/local/bin/xrandr-setup.sh - mode: 0755 - - - name: install xrandr setup script - copy: - content: | - [SeatDefaults] - greeter-setup-script=/usr/local/bin/xrandr-setup.sh - session-setup-script=/usr/local/bin/xrandr-setup.sh - dest: /etc/lightdm/lightdm.conf.d/xrandr-setup.conf - ## not restarting lightdm because this would logg-off any logged in user! +- name: configure lightdm + import_tasks: lightdm.yml |