Expicitly add pacman epo keys

This commit is contained in:
Jake Howard 2021-02-23 17:48:40 +00:00
parent 481dde7e84
commit 5bf155c03c
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -1,8 +1,25 @@
- name: Get repository keys
shell: pacman-key --list-sigs
become: true
register: repo_keys
changed_when: false
- name: Install custom repo keys
shell:
cmd: pacman-key -r {{ item }} && pacman-key --lsign-key {{ item }}
become: true
register: added_repo_keys
loop:
- 8A8F901A # Sublime Text
- 9D5F1C051D146843CDA4858BDE64825E7CBC0D51 # ArchStrike
when: item not in repo_keys.stdout
- name: Install pacman config - name: Install pacman config
template: template:
src: ./files/pacman.conf src: ./files/pacman.conf
dest: /etc/pacman.conf dest: /etc/pacman.conf
mode: 0644 mode: 0644
register: pacman_conf
- name: Create aur_builder user - name: Create aur_builder user
user: user:
@ -27,6 +44,12 @@
become: true become: true
become_user: aur_builder become_user: aur_builder
- name: Update package repositories
pacman:
update_cache: yes
become: true
when: added_repo_keys.changed or pacman_conf.changed
- name: Install additional repo keyrings - name: Install additional repo keyrings
aur: aur:
name: "{{ item }}" name: "{{ item }}"