|
5 | 5 | - apt-transport-https |
6 | 6 | - ca-certificates |
7 | 7 |
|
8 | | -- name: Install CernVM apt key |
| 8 | +- name: Remove old CernVM GPG key from legacy keyring |
9 | 9 | ansible.builtin.apt_key: |
10 | 10 | url: https://cvmrepo.web.cern.ch/cvmrepo/apt/cernvm.gpg |
| 11 | + state: absent |
| 12 | + ignore_errors: true |
| 13 | + when: ansible_distribution == 'Ubuntu' and ansible_distribution_release in ('jammy', 'noble') |
11 | 14 |
|
12 | | -- name: Configure CernVM apt repository |
| 15 | +- name: Download CernVM GPG key |
| 16 | + ansible.builtin.get_url: |
| 17 | + url: https://cvmrepo.web.cern.ch/cvmrepo/apt/cernvm.gpg |
| 18 | + dest: /usr/share/keyrings/cernvm.gpg |
| 19 | + mode: '0644' |
| 20 | + when: ansible_distribution == 'Ubuntu' and ansible_distribution_release in ('jammy', 'noble') |
| 21 | + |
| 22 | +- name: Configure CernVM apt repository for non-Ubuntu distributions |
13 | 23 | ansible.builtin.apt_repository: |
14 | | - filename: cernvm.list |
| 24 | + filename: cernvm |
15 | 25 | mode: 422 |
16 | | - repo: deb [allow-insecure=true] https://cvmrepo.web.cern.ch/cvmrepo/apt/ {{ ansible_distribution_release }}-prod main |
| 26 | + repo: deb [signed-by=/usr/share/keyrings/cernvm.gpg] https://cvmrepo.web.cern.ch/cvmrepo/apt/ {{ ansible_distribution_release }}-prod main |
17 | 27 | when: ansible_distribution != 'Ubuntu' |
18 | 28 |
|
19 | | -- name: Configure CernVM apt repository |
| 29 | +- name: Configure CernVM apt repository for older Ubuntu releases |
20 | 30 | ansible.builtin.apt_repository: |
21 | 31 | filename: cernvm.list |
22 | 32 | mode: 422 |
23 | 33 | repo: deb [allow-insecure=true] https://cvmrepo.web.cern.ch/cvmrepo/apt/ {{ ansible_distribution_release }}-prod main |
24 | | - when: ansible_distribution == 'Ubuntu' and ansible_distribution_release in ('bionic', 'xenial', 'precise', 'focal', 'jammy', 'noble') |
| 34 | + when: ansible_distribution == 'Ubuntu' and ansible_distribution_release in ('bionic', 'xenial', 'precise', 'focal') |
| 35 | + |
| 36 | +- name: Configure CernVM apt repository for modern Ubuntu releases |
| 37 | + ansible.builtin.apt_repository: |
| 38 | + filename: cernvm |
| 39 | + mode: 422 |
| 40 | + repo: deb [signed-by=/usr/share/keyrings/cernvm.gpg] https://cvmrepo.web.cern.ch/cvmrepo/apt/ {{ ansible_distribution_release }}-prod main |
| 41 | + when: ansible_distribution == 'Ubuntu' and ansible_distribution_release in ('jammy', 'noble') |
25 | 42 |
|
26 | 43 | # There are no packages for any of the non LTS versions so good |
27 | 44 | # luck and have fun if that's you. |
28 | | -- name: Configure CernVM apt repository |
| 45 | +- name: Configure CernVM apt repository for non-LTS Ubuntu releases |
29 | 46 | ansible.builtin.apt_repository: |
30 | | - filename: cernvm.list |
| 47 | + filename: cernvm |
31 | 48 | mode: 422 |
32 | | - repo: deb [allow-insecure=true] https://cvmrepo.web.cern.ch/cvmrepo/apt/ xenial-prod main |
| 49 | + repo: deb [signed-by=/usr/share/keyrings/cernvm.gpg] https://cvmrepo.web.cern.ch/cvmrepo/apt/ xenial-prod main |
33 | 50 | when: ansible_distribution == 'Ubuntu' and ansible_distribution_release not in ('bionic', 'xenial', 'precise', 'focal', 'jammy', 'noble') |
34 | 51 |
|
| 52 | +- name: Update apt cache after key changes |
| 53 | + ansible.builtin.apt: |
| 54 | + update_cache: yes |
| 55 | + |
35 | 56 | - name: Install CernVM-FS packages and dependencies (apt) |
36 | 57 | ansible.builtin.apt: |
37 | 58 | name: "{{ cvmfs_packages[_cvmfs_role] }}" |
|
0 commit comments