mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-19 16:56:04 +02:00
Implemented autostart of caffeine with the help of chat gpt: https://chat.openai.com/share/fa846dac-6068-4386-b3e7-b75f1248ec82
This commit is contained in:
19
roles/pc_application_caffeine/tasks/main.yml
Normal file
19
roles/pc_application_caffeine/tasks/main.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
- name: install caffeine
|
||||
kewlfft.aur.aur:
|
||||
use: yay
|
||||
name:
|
||||
- caffeine-ng
|
||||
|
||||
- name: Check if caffeine is installed
|
||||
command: command -v caffeine
|
||||
register: caffeine_installed
|
||||
changed_when: False
|
||||
failed_when: caffeine_installed.rc != 0
|
||||
|
||||
- name: Copy caffeine systemd service file
|
||||
template:
|
||||
src: caffeine.service.j2
|
||||
dest: /etc/systemd/system/caffeine.service
|
||||
notify:
|
||||
- reload systemd
|
||||
- enable and start caffeine
|
Reference in New Issue
Block a user