From a54c966ad0bd6380effa2658d66a76c5377ebb31 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sun, 10 Sep 2023 18:25:36 -0400 Subject: [PATCH] Install the launch keyboard configurator. --- .../roles/launch_keyboard/tasks/linux.yaml | 34 ++++++++++++------- .../files/dont_sleep_usb_rulesd.conf | 6 ++++ 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/ansible/roles/launch_keyboard/tasks/linux.yaml b/ansible/roles/launch_keyboard/tasks/linux.yaml index 262ba52..c0ed422 100644 --- a/ansible/roles/launch_keyboard/tasks/linux.yaml +++ b/ansible/roles/launch_keyboard/tasks/linux.yaml @@ -1,13 +1,23 @@ -# - name: Install packages -# package: -# name: -# - system76-firmware -# state: present +- name: Build aur packages + register: buildaur + become_user: "{{ build_user.name }}" + command: "aurutils-sync --no-view {{ item }}" + args: + creates: "/var/cache/pacman/custom/{{ item }}-*.pkg.tar.*" + loop: + - system76-keyboard-configurator -# - name: Enable services -# systemd: -# enabled: yes -# name: "{{ item }}" -# daemon_reload: yes -# loop: -# - system76-firmware-daemon.service +- name: Update cache + when: buildaur.changed + pacman: + name: [] + state: present + update_cache: true + +- name: Install packages + package: + name: + - dfu-programmer # For flashing keyboard https://support.system76.com/articles/launch_2-firmware-update/ + - avrdude # For flashing keyboard https://support.system76.com/articles/launch_2-firmware-update/ + - system76-keyboard-configurator + state: present diff --git a/ansible/roles/power_management/files/dont_sleep_usb_rulesd.conf b/ansible/roles/power_management/files/dont_sleep_usb_rulesd.conf index 5cfdb16..5c9d568 100644 --- a/ansible/roles/power_management/files/dont_sleep_usb_rulesd.conf +++ b/ansible/roles/power_management/files/dont_sleep_usb_rulesd.conf @@ -1,3 +1,9 @@ ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="1832", TEST=="power/autosuspend" ATTR{power/autosuspend}="-1" ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="308f", ATTR{idProduct}=="0011", TEST=="power/autosuspend" ATTR{power/autosuspend}="-1" + +# Launch keyboard ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="3384", ATTR{idProduct}=="0006", TEST=="power/autosuspend" ATTR{power/autosuspend}="-1" + +# DFU Programmer on launch keyboard +ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="03eb", ATTR{idProduct}=="2ff9", TEST=="power/autosuspend" ATTR{power/autosuspend}="-1" +ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="03eb", ATTR{idProduct}=="2ff9", TAG+="uaccess"