aur repo wip

This commit is contained in:
2024-04-23 00:49:49 +12:00
parent 85330c8645
commit a6eb508cf0
17 changed files with 171 additions and 34 deletions

View File

@ -0,0 +1,5 @@
---
- name: Update pacman
community.general.pacman:
update_cache: true

View File

@ -0,0 +1,45 @@
---
- name: Check if repo public key is in pacman keyring
ansible.builtin.command:
argv:
- pacman-key
- --list-keys
- "{{ aur_repo_client_repo_name }}"
register: repo_key_check
failed_when: repo_key_check.rc not in [0, 2]
changed_when: false
- name: Add repo public key to pacman keyring
when: repo_key_check.rc == 2
block:
- name: Import the repo public key
ansible.builtin.command:
argv:
- pacman-key
- --recv-keys
- "{{ aur_repo_client_public_key_fingerprint }}"
- --keyserver
- "{{ aur_repo_client_keyserver }}"
changed_when: true
- name: Trust the repo public key
ansible.builtin.command:
argv:
- pacman-key
- --lsign-key
- "{{ aur_repo_client_public_key }}"
changed_when: true
- name: Add home repo block to pacman.conf
ansible.builtin.blockinfile:
path: /etc/pacman.conf
block: |
[{{ aur_repo_client_repo_name }}]
SigLevel = Required TrustedOnly
Server = {{ aur_repo_client_repo_address }}
create: false
state: present
insertafter: EOF
notify: Update pacman

View File

@ -0,0 +1,4 @@
aur_repo_client_repo_name: "home"
aur_repo_client_repo_address: "https://repo.balsillie.house"
aur_repo_client_public_key: DB529158B99DD8311D78CA2FBE6003C744F56EE2
aur_repo_client_keyserver: hkps://keyserver.ubuntu.com