|
| 1 | + |
| 2 | +--- |
| 3 | + |
| 4 | +# The CERNVM GPG key is the trust anchor for the secure installation of the CVMFS client. |
| 5 | +# |
| 6 | +# The Compute Canada CVMFS GPG key is the trust anchor for the secure distribution of the Compute Canada software stack (and other content), as follows: |
| 7 | +# - the Compute Canada CVMFS GPG key verifies the authenticity of the computecanada-release RPM |
| 8 | +# - the computecanada-release RPM configures a yum repository which distributes the cvmfs-config-computecanada RPM |
| 9 | +# - the cvmfs-config-computecanada RPM contains the public CVMFS key for the cvmfs-config.computecanada.ca CVMFS configuration repository |
| 10 | +# - the CVMFS configuration repository contains the public CVMFS keys for all other Compute Canada CVMFS repositories |
| 11 | +# - the other CVMFS repositories contain all Compute Canada software (and other content) |
| 12 | + |
| 13 | +- name: Install CernVM GPG key |
| 14 | + apt_key: |
| 15 | + key: https://cvmrepo.web.cern.ch/cvmrepo/apt/cernvm.gpg |
| 16 | + state: present |
| 17 | + validate_certs: yes |
| 18 | + fingerprint: "70B9 8904 8820 8E31 5ED4 5208 230D 389D 8AE4 5CE7" |
| 19 | + |
| 20 | +# Also available at https://git.computecanada.ca/cc-cvmfs-public/cvmfs-config/raw/master/RPM-GPG-KEY-CC-CVMFS-1 |
| 21 | +- name: Install Compute Canada CVMFS GPG key |
| 22 | + apt_key: |
| 23 | + key: https://package.computecanada.ca/yum/cc-cvmfs-public/RPM-GPG-KEY-CC-CVMFS-1 |
| 24 | + state: present |
| 25 | + validate_certs: yes |
| 26 | + fingerprint: "C0C4 0F04 70A3 6AF2 7CC4 4D5A 3B9F C55A CF21 4CFC" |
| 27 | + when: '"cvmfs-config-computecanada" in cvmfs_configuration' |
| 28 | + |
| 29 | +# Target hosts will need internet access anyway to install the actual packages via yum, so we might as well |
| 30 | +# install the yum config from the internet as well - if a version is not already installed. |
| 31 | +# There is no benefit to abstracting this with the yum_repository module, and doing so would break idempotence |
| 32 | +# because these packages update themselves via their own yum repositories. |
| 33 | + |
| 34 | +- name: Install CernVM apt repository |
| 35 | + yum: |
| 36 | + name: https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest_all.deb |
| 37 | + state: present |
| 38 | + validate_certs: yes |
| 39 | + when: ansible_facts.packages['cvmfs-release'] is not defined |
| 40 | + |
| 41 | +- name: Install Compute Canada apt repository |
| 42 | + yum: |
| 43 | + name: https://package.computecanada.ca/yum/cc-cvmfs-public/prod/RPM/computecanada-release-latest.noarch.rpm |
| 44 | + state: present |
| 45 | + validate_certs: yes |
| 46 | + when: |
| 47 | + - '"cvmfs-config-computecanada" in cvmfs_configuration' |
| 48 | + - ansible_facts.packages['computecanada-release'] is not defined |
| 49 | + |
| 50 | +- name: Install other prerequisite packages |
| 51 | + yum: |
| 52 | + name: [ 'lvm2' ] |
| 53 | + when: cvmfs_client_configure_storage | bool |
| 54 | + |
| 55 | + |
| 56 | +- name: Install CVMFS client and configuration packages |
| 57 | + yum: |
| 58 | + name: "['cvmfs'] + {{ cvmfs_auto_setup_package }} + {{ cvmfs_configuration }}" |
| 59 | + vars: |
| 60 | + cvmfs_auto_setup_package: "{{ ['cvmfs-auto-setup'] if cvmfs_auto_setup|bool else [] }}" |
| 61 | + |
0 commit comments