mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-10-31 10:19:09 +00:00 
			
		
		
		
	Huge role refactoring/cleanup. Other commits will propably follow. Because some bugs will exist. Still important for longrun and also for auto docs/help/slideshow generation
This commit is contained in:
		
							
								
								
									
										25
									
								
								roles/generic-aur-helper/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								roles/generic-aur-helper/README.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,25 @@ | ||||
| # System AUR Helper | ||||
|  | ||||
| ## Description | ||||
|  | ||||
| This role ensures that the AUR helper [yay](https://wiki.archlinux.org/title/Yay) is installed on the system. It installs yay via [pacman](https://wiki.archlinux.org/title/Pacman) and creates a dedicated `aur_builder` user to facilitate building AUR packages. | ||||
|  | ||||
| ## Overview | ||||
|  | ||||
| The role performs the following tasks: | ||||
| - Installs the AUR helper [yay](https://wiki.archlinux.org/title/Yay) using pacman. | ||||
| - Creates an `aur_builder` user with a home directory and adds the user to the wheel group. | ||||
| - Grants the `aur_builder` user passwordless [sudo](https://en.wikipedia.org/wiki/Sudo) rights for running pacman. | ||||
|  | ||||
| ## Purpose | ||||
|  | ||||
| The primary purpose of this role is to streamline AUR package management on Arch Linux systems by ensuring that the required AUR helper is installed and properly configured. | ||||
|  | ||||
| ## Features | ||||
|  | ||||
| - **Yay Installation:** Installs the AUR helper [yay](https://wiki.archlinux.org/title/Yay) on Arch Linux. | ||||
| - **User Creation:** Creates a dedicated `aur_builder` user. | ||||
| - **Sudo Configuration:** Grants passwordless sudo rights to `aur_builder` for pacman. | ||||
|  | ||||
| ## Other Resources | ||||
| - https://github.com/kewlfft/ansible-aur | ||||
							
								
								
									
										25
									
								
								roles/generic-aur-helper/meta/main.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								roles/generic-aur-helper/meta/main.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,25 @@ | ||||
| --- | ||||
| galaxy_info: | ||||
|   author: "Kevin Veen-Birkenbach" | ||||
|   description: "Installs the AUR helper yay and configures an aur_builder user with appropriate sudo privileges to facilitate AUR package management on Arch Linux systems." | ||||
|   license: "CyMaIS NonCommercial License (CNCL)" | ||||
|   license_url: "https://s.veen.world/cncl" | ||||
|   company: | | ||||
|     Kevin Veen-Birkenbach | ||||
|     Consulting & Coaching Solutions | ||||
|     https://www.veen.world | ||||
|   min_ansible_version: "2.9" | ||||
|   platforms: | ||||
|     - name: Archlinux | ||||
|       versions: | ||||
|         - rolling | ||||
|   galaxy_tags: | ||||
|     - aur | ||||
|     - yay | ||||
|     - archlinux | ||||
|     - package-management | ||||
|   repository: "https://s.veen.world/cymais" | ||||
|   issue_tracker_url: "https://s.veen.world/cymaisissues" | ||||
|   documentation: "https://s.veen.world/cymais" | ||||
| dependencies: | ||||
|   - generic-fakeroot | ||||
							
								
								
									
										22
									
								
								roles/generic-aur-helper/tasks/main.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								roles/generic-aur-helper/tasks/main.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,22 @@ | ||||
| - name: install yay | ||||
|   community.general.pacman: | ||||
|     name:  | ||||
|       - yay | ||||
|       - patch | ||||
|       - base-devel | ||||
|     state: present | ||||
|  | ||||
| - name: Create the `aur_builder` user | ||||
|   become: yes | ||||
|   ansible.builtin.user: | ||||
|     name: aur_builder | ||||
|     create_home: yes | ||||
|     group: wheel | ||||
|  | ||||
| - name: Allow the `aur_builder` user to run `sudo pacman` without a password | ||||
|   become: yes | ||||
|   ansible.builtin.lineinfile: | ||||
|     path: /etc/sudoers.d/11-install-aur_builder | ||||
|     line: 'aur_builder ALL=(ALL) NOPASSWD: /usr/bin/pacman' | ||||
|     create: yes | ||||
|     validate: 'visudo -cf %s' | ||||
		Reference in New Issue
	
	Block a user