mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Refactored pc roles and added README.md's with help of ChatGPT. See https://chat.openai.com/share/df22ba6a-76d0-47c2-a8c7-daec3f42b4e5
This commit is contained in:
25
roles/pc-caffeine/README.md
Normal file
25
roles/pc-caffeine/README.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Ansible Role: caffeine_auto_start
|
||||
|
||||
An Ansible Role that installs `caffeine-ng` on Archlinux systems and sets it to start automatically when the user logs in.
|
||||
|
||||
## Requirements
|
||||
|
||||
- The target system should be Archlinux.
|
||||
- Ansible 2.4 or higher.
|
||||
- The [kewlfft.aur.aur](https://galaxy.ansible.com/kewlfft/aur) Ansible Galaxy role for managing AUR packages.
|
||||
|
||||
## Role Variables
|
||||
|
||||
None.
|
||||
|
||||
## License
|
||||
|
||||
AGPL 3
|
||||
|
||||
## Author
|
||||
|
||||
Kevin Veen-Birkenbach - kevin@veen.world - https://www.veen.world/
|
||||
|
||||
## Background
|
||||
|
||||
The code for this role was created in an interactive conversation with OpenAI's language model. You can view the original conversation [here](https://chat.openai.com/share/fa846dac-6068-4386-b3e7-b75f1248ec82).
|
16
roles/pc-caffeine/meta/main.yml
Normal file
16
roles/pc-caffeine/meta/main.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
dependencies:
|
||||
- system-aur-helper
|
||||
galaxy_info:
|
||||
author: Kevin Veen-Birkenbach
|
||||
description: Ansible role for installing caffeine-ng and setting it to start at user login.
|
||||
license: AGPL 3
|
||||
min_ansible_version: 2.4
|
||||
platforms:
|
||||
- name: Archlinux
|
||||
versions:
|
||||
- all
|
||||
galaxy_tags:
|
||||
- caffeine
|
||||
- autostart
|
||||
- archlinux
|
16
roles/pc-caffeine/tasks/main.yml
Normal file
16
roles/pc-caffeine/tasks/main.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
- name: Install caffeine
|
||||
kewlfft.aur.aur:
|
||||
use: yay
|
||||
name:
|
||||
- caffeine-ng
|
||||
|
||||
- name: Create autostart directory if it doesn't exist
|
||||
file:
|
||||
path: "{{auto_start_directory}}"
|
||||
state: directory
|
||||
|
||||
- name: Copy caffeine.desktop file to autostart directory
|
||||
template:
|
||||
src: caffeine.desktop.j2
|
||||
dest: "{{auto_start_directory}}caffeine.desktop"
|
10
roles/pc-caffeine/templates/caffeine.desktop.j2
Normal file
10
roles/pc-caffeine/templates/caffeine.desktop.j2
Normal file
@@ -0,0 +1,10 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Exec=/usr/bin/caffeine
|
||||
Hidden=false
|
||||
NoDisplay=false
|
||||
X-GNOME-Autostart-enabled=true
|
||||
Name[en_US]=caffeine
|
||||
Name=caffeine
|
||||
Comment[en_US]=
|
||||
Comment=
|
1
roles/pc-caffeine/vars/main.yml
Normal file
1
roles/pc-caffeine/vars/main.yml
Normal file
@@ -0,0 +1 @@
|
||||
auto_start_directory: "/home/{{client_username}}/.config/autostart/"
|
Reference in New Issue
Block a user