File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
ansible/roles/etc_hosts/tasks
environments/common/inventory/group_vars/all Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 6
6
group : root
7
7
mode : 0644
8
8
become : yes
9
+
10
+ - name : Ensure /exports/hosts directory exists and copy /etc/hosts
11
+ block :
12
+ - name : Ensure the /exports/hosts directory exists
13
+ file :
14
+ path : /exports/hosts
15
+ state : directory
16
+ owner : root
17
+ group : root
18
+ mode : 0755
19
+ become : yes
20
+ delegate_to : " {{ groups['control'] | first }}"
21
+
22
+ - name : Copy /etc/hosts to NFS exported directory
23
+ copy :
24
+ src : /etc/hosts
25
+ dest : /exports/hosts/hosts
26
+ owner : root
27
+ group : root
28
+ mode : 0644
29
+ remote_src : true
30
+ become : yes
31
+ delegate_to : " {{ groups['control'] | first }}"
Original file line number Diff line number Diff line change @@ -15,3 +15,9 @@ nfs_configurations:
15
15
nfs_server : " {{ nfs_server_default }}"
16
16
nfs_export : " /exports/home" # assumes skeleton TF is being used
17
17
nfs_client_mnt_point : " /home"
18
+
19
+ - comment : Export /etc/hosts copy from Slurm control node
20
+ nfs_enable :
21
+ server : " {{ inventory_hostname in groups['control'] }}"
22
+ clients : false
23
+ nfs_export : " /exports/hosts" # control node has to copy in /etc/hosts to here
You can’t perform that action at this time.
0 commit comments