File tree Expand file tree Collapse file tree 3 files changed +34
-22
lines changed Expand file tree Collapse file tree 3 files changed +34
-22
lines changed Original file line number Diff line number Diff line change 2424 tasks :
2525 - include_role :
2626 name : stackhpc.os-manila-mount
27+
28+ - name : Manage /exports/cluster and Manila share info
29+ hosts : control
30+ become : true
31+ tasks :
32+ - block :
33+ - name : Ensure /exports/cluster directory exists
34+ file :
35+ path : /exports/cluster
36+ state : directory
37+ owner : root
38+ group : root
39+ mode : 0755
40+
41+ - name : Copy manila share info to /exports/cluster
42+ copy :
43+ content : " {{ os_manila_mount_share_info | to_nice_yaml }}"
44+ dest : " /exports/cluster/manila_share_info.yml"
45+ when : os_manila_mount_share_info is defined
Original file line number Diff line number Diff line change 77 vars :
88 control_node_ip : " 172.16.1.228"
99 nfs_export_hosts : " /exports/hosts"
10+ nfs_export_cluster : " /exports/cluster"
1011 resolv_conf_nameservers : [1.1.1.1, 8.8.8.8]
1112
1213
127128 src : " {{ nfs_server }}:{{ nfs_export }}"
128129 fstype : nfs
129130 state : " {{ nfs_client_mnt_state }}"
131+
132+ - name : Ensure the mount directory exists
133+ file :
134+ path : /mnt/
135+ state : directory
136+ mode : 0755
137+
138+ - name : Mount /mnt/
139+ mount :
140+ path : /mnt/
141+ src : " {{ vars.control_node_ip }}:{{ nfs_export_cluster }}"
142+ fstype : nfs
143+ opts : rw,sync
144+ state : mounted
130145
131146
132147 - name : Manila mount
Original file line number Diff line number Diff line change 8787 group : root
8888 mode : 0644
8989
90- - name : Ensure /exports/cluster directory exists
91- file :
92- path : /exports/cluster
93- state : directory
94- owner : root
95- group : root
96- mode : 0644
97- delegate_to : " {{ groups['control'] | first }}"
98-
99- - name : Ensure /exports/cluster exists on control node
100- ansible.builtin.file :
101- path : /exports/cluster
102- state : directory
103- mode : ' 0755'
104- delegate_to : " {{ groups['control'] | first }}"
105-
106- - name : Copy manila share info to /exports/cluster
107- copy :
108- content : " {{ os_manila_mount_share_info | to_nice_yaml }}"
109- dest : " /exports/cluster/manila_share_info.yml"
110- delegate_to : " {{ groups['control'] | first }}"
111-
11290- name : Write openhpc munge key
11391 copy :
11492 content : " {{ vault_openhpc_mungekey | b64decode }}"
You can’t perform that action at this time.
0 commit comments