Skip to content

Commit 4453353

Browse files
committed
add debian support
1 parent 3f36584 commit 4453353

File tree

3 files changed

+85
-19
lines changed

3 files changed

+85
-19
lines changed

tasks/debian.yml

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
21
---
32

43
# The CERNVM GPG key is the trust anchor for the secure installation of the CVMFS client.
54
#
65
# 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:
76
# - 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
7+
# - the computecanada-release configures an apt repository which distributes the cvmfs-config-computecanada deb
8+
# - the cvmfs-config-computecanada deb contains the public CVMFS key for the cvmfs-config.computecanada.ca CVMFS configuration repository
109
# - the CVMFS configuration repository contains the public CVMFS keys for all other Compute Canada CVMFS repositories
1110
# - the other CVMFS repositories contain all Compute Canada software (and other content)
1211

@@ -26,36 +25,42 @@
2625
fingerprint: "C0C4 0F04 70A3 6AF2 7CC4 4D5A 3B9F C55A CF21 4CFC"
2726
when: '"cvmfs-config-computecanada" in cvmfs_configuration'
2827

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.
28+
# Target hosts will need internet access anyway to install the actual packages via apt, so we might as well
29+
# install the apt config from the internet as well - if a version is not already installed.
30+
# There is no benefit to abstracting this with the apt_repository module, and doing so would break idempotence
31+
# because these packages update themselves via their own apt repositories.
3332

3433
- name: Install CernVM apt repository
35-
yum:
34+
apt:
3635
name: https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest_all.deb
3736
state: present
3837
validate_certs: yes
3938
when: ansible_facts.packages['cvmfs-release'] is not defined
4039

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
40+
# Todo: repository configuration still missing
41+
#- name: Install Compute Canada apt repository
42+
# apt:
43+
# name: https://package.computecanada.ca/yum/cc-cvmfs-public/prod/other/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: Workaround - install compute canada config package directly from URL
51+
apt:
52+
name: "https://package.computecanada.ca/yum/cc-cvmfs-public/prod/other/cvmfs-config-computecanada-latest.all.deb"
4653
when:
4754
- '"cvmfs-config-computecanada" in cvmfs_configuration'
48-
- ansible_facts.packages['computecanada-release'] is not defined
4955

5056
- name: Install other prerequisite packages
51-
yum:
57+
apt:
5258
name: [ 'lvm2' ]
5359
when: cvmfs_client_configure_storage | bool
5460

55-
5661
- name: Install CVMFS client and configuration packages
57-
yum:
58-
name: "['cvmfs'] + {{ cvmfs_auto_setup_package }} + {{ cvmfs_configuration }}"
62+
apt:
63+
name: "['cvmfs'] + {{ cvmfs_configuration }}"
5964
vars:
6065
cvmfs_auto_setup_package: "{{ ['cvmfs-auto-setup'] if cvmfs_auto_setup|bool else [] }}"
6166

tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
check_mode: no
66
tags:
77
- yum
8+
- apt
89

910
- { import_tasks: users.yml, tags: ['users'] }
1011
- { import_tasks: storage.yml, tags: ['storage'], when: cvmfs_client_configure_storage | bool }
1112
- { import_tasks: redhat.yml, tags: ['packages','keys','yum'], when: ansible_os_family == 'RedHat' }
1213
- { import_tasks: debian.yml, tags: ['packages','keys','apt'], when: ansible_os_family == 'Debian' }
1314
- { import_tasks: config.yml, tags: ['config'] }
1415
- { import_tasks: test.yml, tags: ['test'] }
15-

tasks/redhat.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
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+
rpm_key:
15+
key: https://cvmrepo.web.cern.ch/cvmrepo/yum/RPM-GPG-KEY-CernVM
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+
rpm_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 yum repository
35+
yum:
36+
name: https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest.noarch.rpm
37+
state: present
38+
validate_certs: yes
39+
when: ansible_facts.packages['cvmfs-release'] is not defined
40+
41+
- name: Install Compute Canada yum 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

Comments
 (0)