Skip to content

Commit 4efb739

Browse files
priteausjpb
andauthored
Use checksum verification for CernVM-FS GPG key (#641)
The cvmrepo repository is sometimes down. This avoids fetching the GPG key each time if it was already done, preventing Ansible failures. It also verifies that the key is the expected one instead of blindly trusting any GPG key. This should not require much maintenance since the key appears to be the same since it was generated in 2010. Co-authored-by: Steve Brasier <[email protected]>
1 parent d93fe58 commit 4efb739

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

ansible/roles/eessi/defaults/main.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ cvmfs_config_default:
99
cvmfs_config_overrides: {}
1010

1111
cvmfs_config: "{{ cvmfs_config_default | combine(cvmfs_config_overrides) }}"
12+
13+
cvmfs_gpg_checksum: "sha256:4ac81adff957565277cfa6a4a330cdc2ce5a8fdd73b8760d1a5a32bef71c4bd6"

ansible/roles/eessi/tasks/main.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
---
22
- name: Download Cern GPG key
33
ansible.builtin.get_url:
4-
url: http://cvmrepo.web.cern.ch/cvmrepo/yum/RPM-GPG-KEY-CernVM
4+
url: http://cvmrepo.web.cern.ch/cvmrepo/yum/RPM-GPG-KEY-CernVM
55
dest: ./cvmfs-key.gpg
6+
checksum: "{{ cvmfs_gpg_checksum }}"
67

78
- name: Import downloaded GPG key
89
command: rpm --import cvmfs-key.gpg
@@ -24,7 +25,7 @@
2425

2526
# Alternative version using official repo - still no GPG key :(
2627
# - name: Add EESSI repo
27-
# dnf:
28+
# dnf:
2829
# name: http://repo.eessi-infra.org/eessi/rhel/8/noarch/eessi-release-0-1.noarch.rpm
2930

3031
# - name: Install EESSI CVMFS config
@@ -39,9 +40,9 @@
3940
value: "{{ item.value }}"
4041
no_extra_spaces: true
4142
loop: "{{ cvmfs_config | dict2items }}"
42-
43+
4344

4445
# NOTE: Not clear how to make this idempotent
4546
- name: Ensure CVMFS config is setup
4647
command:
47-
cmd: "cvmfs_config setup"
48+
cmd: "cvmfs_config setup"

0 commit comments

Comments
 (0)