From 5bf155c03c827d3fcbf09b076e2fb76fc3107a77 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Tue, 23 Feb 2021 17:48:40 +0000 Subject: [PATCH] Expicitly add pacman epo keys --- tasks/packages.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tasks/packages.yml b/tasks/packages.yml index 050b7c3..99d97c9 100644 --- a/tasks/packages.yml +++ b/tasks/packages.yml @@ -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 template: src: ./files/pacman.conf dest: /etc/pacman.conf mode: 0644 + register: pacman_conf - name: Create aur_builder user user: @@ -27,6 +44,12 @@ become: true 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 aur: name: "{{ item }}"