mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-01 02:33:10 +01:00
Implemented update for yay
This commit is contained in:
parent
3120b23eb4
commit
ace70337ea
@ -2,11 +2,11 @@
|
|||||||
community.general.pacman:
|
community.general.pacman:
|
||||||
name:
|
name:
|
||||||
- ttf-liberation
|
- ttf-liberation
|
||||||
- libreoffice-still
|
- libreoffice-fresh
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: install libreoffice language packages
|
- name: install libreoffice language packages
|
||||||
community.general.pacman:
|
community.general.pacman:
|
||||||
name: "libreoffice-still-{{ item }}"
|
name: "libreoffice-fresh-{{ item }}"
|
||||||
state: present
|
state: present
|
||||||
loop: "{{libreoffice_languages}}"
|
loop: "{{libreoffice_languages}}"
|
||||||
|
@ -17,10 +17,3 @@
|
|||||||
line: 'aur_builder ALL=(ALL) NOPASSWD: /usr/bin/pacman'
|
line: 'aur_builder ALL=(ALL) NOPASSWD: /usr/bin/pacman'
|
||||||
create: yes
|
create: yes
|
||||||
validate: 'visudo -cf %s'
|
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
|
|
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
|
@ -18,3 +18,14 @@
|
|||||||
include_role:
|
include_role:
|
||||||
name: update-docker
|
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