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 24
24
tasks :
25
25
- include_role :
26
26
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 7
7
vars :
8
8
control_node_ip : " 172.16.1.228"
9
9
nfs_export_hosts : " /exports/hosts"
10
+ nfs_export_cluster : " /exports/cluster"
10
11
resolv_conf_nameservers : [1.1.1.1, 8.8.8.8]
11
12
12
13
127
128
src : " {{ nfs_server }}:{{ nfs_export }}"
128
129
fstype : nfs
129
130
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
130
145
131
146
132
147
- name : Manila mount
Original file line number Diff line number Diff line change 87
87
group : root
88
88
mode : 0644
89
89
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
-
112
90
- name : Write openhpc munge key
113
91
copy :
114
92
content : " {{ vault_openhpc_mungekey | b64decode }}"
You can’t perform that action at this time.
0 commit comments