Skip to content

Commit 8d77ceb

Browse files
committed
try to clarify nfs export intents
1 parent f64ca36 commit 8d77ceb

File tree

1 file changed

+8
-6
lines changed
  • environments/common/inventory/group_vars/all

1 file changed

+8
-6
lines changed

environments/common/inventory/group_vars/all/nfs.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55

66
nfs_server_default: "{{ groups['control'] | first }}" # avoid using hostvars for compute-init
77

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 }}"
1113

1214
nfs_configurations:
1315
- comment: Export /exports/home from Slurm control node as /home
@@ -22,7 +24,7 @@ nfs_configurations:
2224
# NB: this is stackhpc.nfs role defaults but are set here to prevent being
2325
# accidently overriden via default options
2426
nfs_export_options: 'rw,secure,root_squash'
25-
# prevent other IPs mounting the share:
27+
# prevent non-cluster IPs mounting the share:
2628
# 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 }}"

0 commit comments

Comments
 (0)