aur repo host complete

This commit is contained in:
2024-04-23 15:47:14 +12:00
parent 2cc78654fe
commit 7df41b5c8d
9 changed files with 150 additions and 20 deletions

View File

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

View File

@ -5,13 +5,13 @@
argv:
- pacman-key
- --list-keys
- "{{ aur_repo_client_repo_name }}"
- "{{ aur_repo_client_public_key_fingerprint }}"
register: repo_key_check
failed_when: repo_key_check.rc not in [0, 2]
failed_when: repo_key_check.rc not in [0, 1]
changed_when: false
- name: Add repo public key to pacman keyring
when: repo_key_check.rc == 2
when: repo_key_check.rc == 1
block:
- name: Import the repo public key
@ -29,7 +29,7 @@
argv:
- pacman-key
- --lsign-key
- "{{ aur_repo_client_public_key }}"
- "{{ aur_repo_client_public_key_fingerprint }}"
changed_when: true
- name: Add home repo block to pacman.conf
@ -42,4 +42,9 @@
create: false
state: present
insertafter: EOF
notify: Update pacman
register: add_pacman_repo
- name: Update pacman database # noqa: no-handler
when: add_pacman_repo.changed
community.general.pacman:
update_cache: true

View File

@ -1,4 +1,6 @@
---
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
aur_repo_client_public_key_fingerprint: DB529158B99DD8311D78CA2FBE6003C744F56EE2
aur_repo_client_keyserver: hkps://keyserver.ubuntu.com