Stop using apt_key: module to install keyrings

Fixes #16 by replacing uses of the `apt_key:` module with `get_url:` to
download apt keyrings into `/etc/apt/keyrings`, then used
`signed-by=/etc/path/keyrings/<keyring>` in the appropriate sources.list
file.
This commit is contained in:
2023-06-24 11:25:54 +01:00
parent 026969a32d
commit 31a819e481
2 changed files with 50 additions and 15 deletions

View File

@@ -1,16 +1,23 @@
---
- set_fact:
keyring: /etc/apt/trusted.gpg.d/1password-archive-keyring.gpg
- name: set keyring path
set_fact:
keyring: /etc/apt/keyrings/1password.asc
old_keyring: /etc/apt/trusted.gpg.d/1password-archive-keyring.gpg
- name: remove old keyring
file:
path: '{{old_keyring}}'
state: absent
- name: add apt signing key
when: '"WSL" not in ansible_kernel'
become: true
apt_key:
get_url:
url: https://downloads.1password.com/linux/keys/1password.asc
keyring: '{{keyring}}'
state: present
dest: '{{keyring}}'
- when: ansible_machine == 'x86_64'
- name: set compatible architecture
when: ansible_machine == 'x86_64'
set_fact:
arch: amd64