|
13 | 13 | loop: |
14 | 14 | - /etc/apt/sources.list.d/repo_openbytes_ie_patchman_debian.list |
15 | 15 | - /etc/apt/sources.list.d/repo_openbytes_ie_patchman_ubuntu.list |
16 | | -# Debian: openbytes ships openbytes-1.gpg for trixie+ because the original key |
17 | | -# has malformed binding signatures that trixie's sqv verifier rejects. |
18 | | -# Ubuntu: the patchman/ubuntu repo is signed with a different key (551582C0FCAAD24A) |
19 | | -# not present in openbytes.gpg or openbytes-1.gpg; fetch it from keyserver instead. |
20 | | -- name: Get openbytes apt key (Debian) |
| 16 | +# Debian trixie+: openbytes ships openbytes-1.gpg because the original key has |
| 17 | +# malformed binding signatures that trixie's sqv verifier rejects. |
| 18 | +# Debian bookworm / Ubuntu: the patchman repo is signed with key 551582C0FCAAD24A |
| 19 | +# which is not present in openbytes.gpg or openbytes-1.gpg; fetch from keyserver. |
| 20 | +- name: Get openbytes apt key (Debian trixie+) |
21 | 21 | ansible.builtin.get_url: |
22 | | - url: "{{ 'https://repo.openbytes.ie/openbytes-1.gpg' if ansible_facts['distribution_release'] in ['trixie', 'forky'] else 'https://repo.openbytes.ie/openbytes.gpg' }}" |
| 22 | + url: "https://repo.openbytes.ie/openbytes-1.gpg" |
23 | 23 | dest: /etc/apt/keyrings/openbytes.gpg |
24 | 24 | force: true |
25 | | - when: ansible_facts['distribution'] == 'Debian' |
| 25 | + when: ansible_facts['distribution'] == 'Debian' and ansible_facts['distribution_release'] in ['trixie', 'forky'] |
26 | 26 | notify: |
27 | 27 | - Update apt cache |
28 | | -- name: Download openbytes apt key (Ubuntu) |
| 28 | +- name: Download openbytes apt key from keyserver (Debian bookworm / Ubuntu) |
29 | 29 | ansible.builtin.get_url: |
30 | 30 | url: "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x551582C0FCAAD24A&options=mr" |
31 | 31 | dest: /tmp/openbytes.asc |
32 | 32 | force: true |
33 | | - when: ansible_facts['distribution'] == 'Ubuntu' |
34 | | -- name: Install openbytes apt key (Ubuntu) |
| 33 | + when: ansible_facts['distribution'] == 'Ubuntu' or |
| 34 | + (ansible_facts['distribution'] == 'Debian' and ansible_facts['distribution_release'] not in ['trixie', 'forky']) |
| 35 | +- name: Install openbytes apt key from keyserver (Debian bookworm / Ubuntu) |
35 | 36 | ansible.builtin.command: |
36 | 37 | cmd: gpg --batch --yes --dearmor -o /etc/apt/keyrings/openbytes.gpg /tmp/openbytes.asc |
37 | 38 | changed_when: true |
38 | | - when: ansible_facts['distribution'] == 'Ubuntu' |
| 39 | + when: ansible_facts['distribution'] == 'Ubuntu' or |
| 40 | + (ansible_facts['distribution'] == 'Debian' and ansible_facts['distribution_release'] not in ['trixie', 'forky']) |
39 | 41 | notify: |
40 | 42 | - Update apt cache |
41 | 43 | - name: Add openbytes repo |
|
0 commit comments