mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-10-31 18:23:12 +01:00
Implemented update for yay
This commit is contained in:
parent
3120b23eb4
commit
ace70337ea
@ -2,11 +2,11 @@
|
||||
community.general.pacman:
|
||||
name:
|
||||
- ttf-liberation
|
||||
- libreoffice-still
|
||||
- libreoffice-fresh
|
||||
state: present
|
||||
|
||||
- name: install libreoffice language packages
|
||||
community.general.pacman:
|
||||
name: "libreoffice-still-{{ item }}"
|
||||
name: "libreoffice-fresh-{{ item }}"
|
||||
state: present
|
||||
loop: "{{libreoffice_languages}}"
|
||||
|
@ -16,11 +16,4 @@
|
||||
path: /etc/sudoers.d/11-install-aur_builder
|
||||
line: 'aur_builder ALL=(ALL) NOPASSWD: /usr/bin/pacman'
|
||||
create: yes
|
||||
validate: 'visudo -cf %s'
|
||||
|
||||
- name: Upgrade the system using yay, only act on AUR packages.
|
||||
become: false
|
||||
kewlfft.aur.aur:
|
||||
upgrade: yes
|
||||
use: yay
|
||||
aur_only: yes
|
||||
validate: 'visudo -cf %s'
|
33
roles/update-yay/README.md
Normal file
33
roles/update-yay/README.md
Normal file
@ -0,0 +1,33 @@
|
||||
# Ansible Role: update-yay
|
||||
|
||||
This Ansible role is designed for updating AUR packages on Arch Linux systems using `yay`. It automates the process of upgrading AUR packages, ensuring that your system stays up-to-date with the latest versions available in the Arch User Repository (AUR).
|
||||
|
||||
## Requirements
|
||||
|
||||
The role requires that `yay` (Yet Another Yaourt) - an AUR helper - is already installed on the system. If `yay` is not installed, the role `system-aur-helper` should handle its installation.
|
||||
|
||||
## Role Dependencies
|
||||
|
||||
- `system-aur-helper`: This dependency is essential for ensuring that `yay` is available on the system. If `yay` is not installed, this role will manage its installation.
|
||||
|
||||
## Role Variables
|
||||
|
||||
There are no specific variables that need to be defined by the user for this role. The role utilizes the `kewlfft.aur.aur` module with predefined parameters to manage AUR packages.
|
||||
|
||||
## Role Tasks
|
||||
|
||||
- **Upgrade AUR Packages**: The main task of this role is to upgrade the system using `yay`, focusing solely on AUR packages. This task does not require elevated privileges (become: false).
|
||||
|
||||
## Example Playbook
|
||||
|
||||
Here's an example of how to include the `update-yay` role in your playbook:
|
||||
|
||||
```yaml
|
||||
- hosts: all
|
||||
roles:
|
||||
- role: update-yay
|
||||
```
|
||||
|
||||
## Author Information
|
||||
|
||||
This role was created by Kevin Veen-Birkenbach.
|
2
roles/update-yay/meta/main.yml
Normal file
2
roles/update-yay/meta/main.yml
Normal file
@ -0,0 +1,2 @@
|
||||
dependencies:
|
||||
- system-aur-helper
|
6
roles/update-yay/tasks/main.yml
Normal file
6
roles/update-yay/tasks/main.yml
Normal file
@ -0,0 +1,6 @@
|
||||
- name: upgrade the system using yay, only act on AUR packages.
|
||||
become: false
|
||||
kewlfft.aur.aur:
|
||||
upgrade: yes
|
||||
use: yay
|
||||
aur_only: yes
|
@ -17,4 +17,15 @@
|
||||
- name: "Update Docker Images"
|
||||
include_role:
|
||||
name: update-docker
|
||||
when: docker_compose_directory_stat.stat.exists
|
||||
when: docker_compose_directory_stat.stat.exists
|
||||
|
||||
- name: "Check if yay is installed"
|
||||
command: which yay
|
||||
ignore_errors: yes
|
||||
register: yay_installed
|
||||
changed_when: false
|
||||
|
||||
- name: "Update with yay"
|
||||
include_role:
|
||||
name: update-yay
|
||||
when: yay_installed.rc == 0
|
Loading…
Reference in New Issue
Block a user