|
13 | 13 | name: "{{ item }}"
|
14 | 14 | state: present
|
15 | 15 | with_items:
|
16 |
| - - light-locker |
17 |
| - - xprintidle |
| 16 | + - light-locker # For locking the screen |
| 17 | + - xprintidle # For detecting idle time of a user |
| 18 | + - ddcci-dkms # For backlight control on external monitors |
18 | 19 | # Assume lightdm, nodejs and npm are already installed by 42.app
|
19 | 20 |
|
| 21 | +- name: Enable ddcci-backlight kernel module |
| 22 | + tags: [codam.webgreeter, codam.webgreeter.init] |
| 23 | + become: true |
| 24 | + modprobe: |
| 25 | + name: ddcci-backlight |
| 26 | + state: present |
| 27 | + persistent: present |
| 28 | + |
| 29 | +- name: Check if xbacklight binary exists |
| 30 | + tags: [codam.webgreeter, codam.webgreeter.init] |
| 31 | + shell: |
| 32 | + cmd: "which xbacklight" |
| 33 | + register: xbacklight_bin |
| 34 | + changed_when: false |
| 35 | + failed_when: false |
| 36 | + |
| 37 | +- name: Clone acpilight repository |
| 38 | + tags: [codam.webgreeter, codam.webgreeter.init] |
| 39 | + git: |
| 40 | + repo: https://gitlab.com/wavexx/acpilight.git |
| 41 | + dest: /tmp/acpilight |
| 42 | + version: v1.2 |
| 43 | + when: xbacklight_bin.stdout == "" # Only when xbacklight is not already available (acpilight is a replacement and has better support) |
| 44 | + |
| 45 | +- name: Install acpilight |
| 46 | + tags: [codam.webgreeter, codam.webgreeter.init] |
| 47 | + become: true |
| 48 | + make: |
| 49 | + target: install |
| 50 | + chdir: /tmp/acpilight |
| 51 | + when: xbacklight_bin.stdout == "" |
| 52 | + |
| 53 | +- name: Check if video group exists # Only exists if acpilight was installed |
| 54 | + tags: [codam.webgreeter, codam.webgreeter.init] |
| 55 | + shell: |
| 56 | + cmd: "getent group video" |
| 57 | + register: video_group |
| 58 | + changed_when: false |
| 59 | + failed_when: false |
| 60 | + |
| 61 | +- name: Add lightdm user to video group |
| 62 | + tags: [codam.webgreeter, codam.webgreeter.init] |
| 63 | + user: |
| 64 | + name: lightdm |
| 65 | + groups: video |
| 66 | + append: yes |
| 67 | + when: video_group.stdout != "" |
| 68 | + |
20 | 69 | - name: Download nody-greeter deb to ansible controller
|
21 | 70 | tags: [codam.webgreeter, codam.webgreeter.init]
|
22 | 71 | delegate_to: localhost
|
|
0 commit comments