File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
environments/common/inventory/group_vars/all Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 5
5
6
6
nfs_server_default : " {{ groups['control'] | first }}" # avoid using hostvars for compute-init
7
7
8
- # only allow the nfs group IPs to mount nfs exports:
9
- nfs_export_clients_default : " {{ groups['nfs'] | map('extract', hostvars, 'ansible_host') | join(' ') }}"
10
- nfs_export_clients : " {{ nfs_export_clients_default }}"
8
+ # create a space-separated list of nfs group IPs:
9
+ _nfs_node_ips : " {{ groups['nfs'] | map('extract', hostvars, 'ansible_host') | join(' ') }}"
10
+
11
+ # default *all* entries in nfs_configurations to only permitting mounts from above IPs:
12
+ nfs_export_clients : " {{ _nfs_node_ips }}"
11
13
12
14
nfs_configurations :
13
15
- comment : Export /exports/home from Slurm control node as /home
@@ -22,7 +24,7 @@ nfs_configurations:
22
24
# NB: this is stackhpc.nfs role defaults but are set here to prevent being
23
25
# accidently overriden via default options
24
26
nfs_export_options : ' rw,secure,root_squash'
25
- # prevent other IPs mounting the share:
27
+ # prevent non-cluster IPs mounting the share:
26
28
# NB: this is set as default for all shares above but is repeated here
27
- # to prevevent being accidently overriden when adding shares
28
- nfs_export_clients : " {{ nfs_export_clients_default }}"
29
+ # in case nfs_export_clients is overriden
30
+ nfs_export_clients : " {{ _nfs_node_ips }}"
You can’t perform that action at this time.
0 commit comments