Skip to content

Commit 4e4f206

Browse files
committed
move manila share info mount to compute_init role
1 parent 8930d38 commit 4e4f206

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

ansible/roles/compute_init/files/compute-init.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,16 @@
33
- name: Compute node initialisation
44
hosts: localhost
55
become: yes
6+
# VARS TO BE SUPPLIED VIA CLOUD INIT METADATA
67
vars:
78
control_node_ip: "172.16.1.228"
89
nfs_export_hosts: "/exports/hosts"
910
resolv_conf_nameservers: [1.1.1.1, 8.8.8.8]
1011

11-
# block device (disk) on which to create the exported filesystem.
12-
# if the disk is not defined, formatting and mounting will not be done.
12+
1313
nfs_disk_location:
14-
# Path to exported filesystem mountpoint on nfs servers
1514
nfs_export: "/exports/home"
16-
# nfs client mount options
1715
nfs_client_mnt_options:
18-
# Path to mountpoint on nfs clients
1916
nfs_client_mnt_point: "/home"
2017
nfs_client_mnt_state: mounted
2118
nfs_server: "{{ control_node_ip }}"
@@ -48,7 +45,6 @@
4845
basic_users_groups: []
4946

5047

51-
# Default to 10GB
5248
cvmfs_quota_limit_mb: 10000
5349
cvmfs_config_default:
5450
CVMFS_CLIENT_PROFILE: single
@@ -137,7 +133,7 @@
137133
block:
138134
- name: Read manila share from nfs file
139135
slurp:
140-
src: "/mnt/cluster/manila_share_info.yml"
136+
src: "/mnt/manila_share_info.yml"
141137
register: manila_share_info_file
142138

143139
- name: Parse and set fact for manila share info

ansible/roles/compute_init/tasks/main.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,26 @@
9696
mode: 0644
9797
delegate_to: "{{ groups['control'] | first }}"
9898

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+
99112
- name: Write openhpc munge key
100113
copy:
101114
content: "{{ vault_openhpc_mungekey | b64decode }}"
102115
dest: "/exports/cluster/openhpc_munge.key"
103116
owner: munge
104117
group: munge
105118
mode: 0400
106-
become: true
107119
delegate_to: "{{ groups['control'] | first }}"
108120

109121

0 commit comments

Comments
 (0)