summaryrefslogtreecommitdiff
path: root/roles/ws/base/tasks/lightdm.yml
blob: 0b90cdc15e25911b47a5e137fa1b6e8cc3fa3e9b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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!