11
11
# block device (disk) on which to create the exported filesystem.
12
12
# if the disk is not defined, formatting and mounting will not be done.
13
13
nfs_disk_location :
14
-
15
14
# Path to exported filesystem mountpoint on nfs servers
16
15
nfs_export : " /exports/home"
17
-
18
16
# nfs client mount options
19
17
nfs_client_mnt_options :
20
-
21
18
# Path to mountpoint on nfs clients
22
19
nfs_client_mnt_point : " /home"
23
20
nfs_client_mnt_state : mounted
24
-
25
21
nfs_server : " {{ control_node_ip }}"
26
22
27
23
38
34
39
35
40
36
basic_users_manage_homedir : false
41
-
42
37
basic_users_userdefaults :
43
38
state : present
44
39
create_home : " {{ basic_users_manage_homedir }}"
45
40
generate_ssh_key : " {{ basic_users_manage_homedir }}"
46
41
ssh_key_comment : " {{ item.name }}"
47
-
48
42
test_user_password : " zXpcWyGQL7jtZnqylQra4g=="
49
-
50
43
basic_users_users :
51
44
- name : testuser # can't use rocky as $HOME isn't shared!
52
45
password : " {{ test_user_password | password_hash('sha512', 65534 | random(seed=inventory_hostname) | string) }}" # idempotent
53
46
uid : 1005
54
47
state : present
55
-
56
48
basic_users_groups : []
57
49
50
+
51
+ # Default to 10GB
52
+ cvmfs_quota_limit_mb : 10000
53
+ cvmfs_config_default :
54
+ CVMFS_CLIENT_PROFILE : single
55
+ CVMFS_QUOTA_LIMIT : " {{ cvmfs_quota_limit_mb }}"
56
+ cvmfs_config_overrides : {}
57
+ cvmfs_config : " {{ cvmfs_config_default | combine(cvmfs_config_overrides) }}"
58
+
59
+
58
60
tasks :
59
61
- name : Configure resolve.conf
60
62
block :
217
219
loop : " {{ basic_users_users }}"
218
220
loop_control :
219
221
label : " {{ item.name }}"
220
- when : " 'sudo' in item"
222
+ when : " 'sudo' in item"
223
+
224
+
225
+ - name : Configure EESSI
226
+ gather_facts : false
227
+ block :
228
+ - name : Download Cern GPG key
229
+ ansible.builtin.get_url :
230
+ url : http://cvmrepo.web.cern.ch/cvmrepo/yum/RPM-GPG-KEY-CernVM
231
+ dest : ./cvmfs-key.gpg
232
+
233
+ - name : Import downloaded GPG key
234
+ command : rpm --import cvmfs-key.gpg
235
+
236
+ - name : Add CVMFS repo
237
+ dnf :
238
+ name : https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest.noarch.rpm
239
+
240
+ - name : Install CVMFS
241
+ dnf :
242
+ name : cvmfs
243
+
244
+ - name : Install EESSI CVMFS config
245
+ dnf :
246
+ name : https://github.com/EESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi-latest.noarch.rpm
247
+ # NOTE: Can't find any docs on obtaining gpg key - maybe downloading directly from github is ok?
248
+ disable_gpg_check : true
249
+
250
+ # Alternative version using official repo - still no GPG key :(
251
+ # - name: Add EESSI repo
252
+ # dnf:
253
+ # name: http://repo.eessi-infra.org/eessi/rhel/8/noarch/eessi-release-0-1.noarch.rpm
254
+
255
+ # - name: Install EESSI CVMFS config
256
+ # dnf:
257
+ # name: cvmfs-config-eessi
258
+
259
+ - name : Add base CVMFS config
260
+ community.general.ini_file :
261
+ dest : /etc/cvmfs/default.local
262
+ section : null
263
+ option : " {{ item.key }}"
264
+ value : " {{ item.value }}"
265
+ no_extra_spaces : true
266
+ loop : " {{ cvmfs_config | dict2items }}"
267
+
268
+
269
+ # NOTE: Not clear how to make this idempotent
270
+ - name : Ensure CVMFS config is setup
271
+ command :
272
+ cmd : " cvmfs_config setup"
0 commit comments