Add arch support

This commit is contained in:
Morten Olsen
2024-10-09 21:25:58 +02:00
parent f8c6ffee46
commit c860e8babb
33 changed files with 527 additions and 23 deletions

View File

@@ -1,2 +1,4 @@
dependencies:
- role: base_info
collections:
- kewlfft.aur

View File

@@ -0,0 +1,27 @@
---
- name: Install dependencies
tags:
- install
become: "{{ use_become }}"
ansible.builtin.package:
name: flatpak
- name: Add the flathub flatpak repository remote to the user installation
become: "{{ use_become }}"
become_user: "{{ username }}"
tags:
- config
community.general.flatpak_remote:
name: flathub
state: present
flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
method: user
- name: Add the flathub flatpak repository remote
tags:
- config
become: "{{ use_become }}"
community.general.flatpak_remote:
name: flathub
state: present
flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo

View File

@@ -23,3 +23,15 @@
path: "{{ home }}"
state: directory
owner: "{{ username }}"
- name: Install yay
tags:
- install
when: archlinux
include_tasks: yay.yml
- name: Install flatpak
tags:
- install
when: archlinux
include_tasks: flatpak.yml

View File

@@ -0,0 +1,21 @@
---
- 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
mode: 0644
validate: "visudo -cf %s"
- name: Yay
aur: name=yay use=makepkg state=present
become: yes
become_user: aur_builder

View File

@@ -0,0 +1,2 @@
---
srcdir: "{{ home }}/.src"