Add keys to local GPG keyring for use with signature validation
This commit is contained in:
parent
5194afec24
commit
07a37c5ef4
1 changed files with 13 additions and 0 deletions
|
@ -9,6 +9,12 @@
|
|||
shell: "pacman-key --list-keys"
|
||||
register: pacman_keys
|
||||
|
||||
- name: "Get known GPG keys"
|
||||
shell: "gpg --list-keys"
|
||||
become: true
|
||||
become_user: "{{ user }}"
|
||||
register: known_gpg_keys
|
||||
|
||||
- name: "Add keys to pacman"
|
||||
shell: "pacman-key -r {{ item }}"
|
||||
when: "item not in pacman_keys.stdout"
|
||||
|
@ -19,6 +25,13 @@
|
|||
when: "item not in pacman_keys.stdout"
|
||||
with_items: "{{ keys }}"
|
||||
|
||||
- name: "Add keys to local keyring"
|
||||
shell: "gpg --recv-keys {{ item }}"
|
||||
become: true
|
||||
become_user: "{{ user }}"
|
||||
when: "item not in known_gpg_keys.stdout"
|
||||
with_items: "{{ keys }}"
|
||||
|
||||
- name: Install pacman config
|
||||
copy:
|
||||
src: ./files/pacman.conf
|
||||
|
|
Loading…
Reference in a new issue