summaryrefslogtreecommitdiff
path: root/roles/ws/base/tasks/lightdm.yml
blob: 57e2aeaff958648d375a23f577fb7f77dbf4cd13 (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:
    dest: /etc/lightdm/lightdm.conf.d/defaults.conf
    content: |
      [Seat:*]
      {% for option, value in ws_base_lightdm_defaults.items() %}
      {{ option }}={{ value }}
      {% endfor %}
  notify: restart lightdm

- name: remove lightdm default config
  when: ws_base_lightdm_defaults is not defined
  file:
    path: /etc/lightdm/lightdm.conf.d/defaults.conf
    state: absent
  notify: restart lightdm


- name: install xrandr setup script
  when: ws_base_xrandr_setup_script is defined
  block:
  - name: install xrandr setup script
    copy:
      dest: /usr/local/bin/xrandr-setup.sh
      content: "{{ ws_base_xrandr_setup_script }}"
      mode: 0755

  - name: install xrandr setup script
    copy:
      dest: /etc/lightdm/lightdm.conf.d/xrandr-setup.conf
      content: |
        [Seat:*]
        greeter-setup-script=/usr/local/bin/xrandr-setup.sh
        session-setup-script=/usr/local/bin/xrandr-setup.sh
    notify: restart lightdm

- 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
  notify: restart lightdm