Skip to content

Commit 5d81e2e

Browse files
committed
move setup
1 parent 8c1d041 commit 5d81e2e

File tree

3 files changed

+16
-18
lines changed

3 files changed

+16
-18
lines changed

Diff for: tasks/config.yml

+6
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
owner: "root"
99
group: "root"
1010
mode: "0644"
11+
register: cvmfs_config_file
1112

1213
- name: Set autofs timeout
1314
ansible.builtin.lineinfile:
@@ -27,3 +28,8 @@
2728
state: "{% if not cvmfs_auto_setup %}mounted{% elif cvmfs_force_unmount %}absent{% endif %}"
2829
when: (not cvmfs_auto_setup) or (cvmfs_force_unmount)
2930
loop: "{{ cvmfs_repositories }}"
31+
32+
# cvmfs-auto-setup package not available for Debian so we have to run it manually...
33+
- name: Configure AutoFS
34+
command: cvmfs_config setup
35+
when: cvmfs_config_file.changed and ansible_os_family == 'Debian'

Diff for: tasks/debian.yml

+10-16
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
when: '"cvmfs-config-computecanada" in cvmfs_configuration'
2727

2828
# 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.
29+
# install the apt config from the internet as well - if a version is not already installed.
3030
# There is no benefit to abstracting this with the apt_repository module, and doing so would break idempotence
3131
# because these packages update themselves via their own apt repositories.
3232

@@ -37,14 +37,14 @@
3737
when: ansible_facts.packages['cvmfs-release'] is not defined
3838

3939
# Todo: repository configuration for apt missing
40-
#- name: Install Compute Canada apt repository
41-
# apt:
42-
# name: https://package.computecanada.ca/yum/cc-cvmfs-public/prod/other/computecanada-release-latest.noarch.rpm
43-
# state: present
44-
# validate_certs: yes
45-
# when:
46-
# - '"cvmfs-config-computecanada" in cvmfs_configuration'
47-
# - ansible_facts.packages['computecanada-release'] is not defined
40+
# - name: Install Compute Canada apt repository
41+
# apt:
42+
# name: https://package.computecanada.ca/yum/cc-cvmfs-public/prod/other/computecanada-release-latest.noarch.rpm
43+
# state: present
44+
# validate_certs: yes
45+
# when:
46+
# - '"cvmfs-config-computecanada" in cvmfs_configuration'
47+
# - ansible_facts.packages['computecanada-release'] is not defined
4848

4949
# This task can be removed once the Compute Canada apt repository is configured
5050
- name: Workaround - install compute canada config package directly from URL
@@ -61,10 +61,4 @@
6161

6262
- name: Install CVMFS client and configuration packages
6363
apt:
64-
name: "['cvmfs'] + {{ cvmfs_configuration }}"
65-
register: cvmfs_client_install
66-
67-
# cvmfs-auto-setup package not available for debian so we have to run it manually...
68-
- name: Configure AutoFS
69-
command: cvmfs_config setup
70-
when: cvmfs_client_install.changed
64+
name: "['cvmfs'] + {{ cvmfs_configuration }}"

Diff for: tasks/redhat.yml

-2
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,8 @@
5151
name: [ 'lvm2' ]
5252
when: cvmfs_client_configure_storage | bool
5353

54-
5554
- name: Install CVMFS client and configuration packages
5655
yum:
5756
name: "['cvmfs'] + {{ cvmfs_auto_setup_package }} + {{ cvmfs_configuration }}"
5857
vars:
5958
cvmfs_auto_setup_package: "{{ ['cvmfs-auto-setup'] if cvmfs_auto_setup|bool else [] }}"
60-

0 commit comments

Comments
 (0)