Skip to content

Commit 51b02d3

Browse files
committed
move manila mount share to nfs export
1 parent 61392ed commit 51b02d3

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

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

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,12 @@
88
control_node_ip: "172.16.1.228"
99
resolv_conf_nameservers: [1.1.1.1, 8.8.8.8]
1010

11-
1211
nfs_export: "/exports/home"
1312
nfs_client_mnt_options:
1413
nfs_client_mnt_point: "/home"
1514
nfs_client_mnt_state: mounted
1615
nfs_server: "{{ control_node_ip }}"
1716

18-
19-
os_manila_mount_shares: []
2017
os_manila_mount_state: mounted
2118
os_manila_mount_opts:
2219
- x-systemd.device-timeout=30
@@ -26,7 +23,6 @@
2623
- rw
2724
os_manila_mount_ceph_conf_path: /etc/ceph
2825

29-
3026
basic_users_manage_homedir: false
3127
basic_users_userdefaults:
3228
state: present
@@ -38,10 +34,8 @@
3834
- name: testuser # can't use rocky as $HOME isn't shared!
3935
password: "{{ test_user_password | password_hash('sha512', 65534 | random(seed=inventory_hostname) | string) }}" # idempotent
4036
uid: 1005
41-
state: present
4237
basic_users_groups: []
4338

44-
4539
openhpc_conf_server: "{{ control_node_ip }}"
4640

4741
tasks:
@@ -114,15 +108,25 @@
114108

115109
- name: Manila mount
116110
block:
117-
- name: Read manila share from nfs file
111+
- name: Read manila share info from nfs file
118112
slurp:
119113
src: "/mnt/cluster/manila_share_info.yml"
120114
register: manila_share_info_file
115+
no_log: true
121116

122117
- name: Parse and set fact for manila share info
123118
set_fact:
124119
os_manila_mount_share_info: "{{ manila_share_info_file.content | b64decode | from_yaml }}"
125120

121+
- name: Read manila shares from nfs file
122+
slurp:
123+
src: "/mnt/cluster/manila_shares.yml"
124+
register: manila_shares_file
125+
126+
- name: Parse and set fact for manila shares
127+
set_fact:
128+
os_manila_mount_shares: "{{ manila_shares_file.content | b64decode | from_yaml }}"
129+
126130
- name: Ensure Ceph configuration directory exists
127131
ansible.builtin.file:
128132
path: "{{ os_manila_mount_ceph_conf_path }}"

ansible/roles/compute_init/tasks/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@
9191
content: "{{ os_manila_mount_share_info | to_nice_yaml }}"
9292
dest: "/exports/cluster/manila_share_info.yml"
9393
when: os_manila_mount_share_info is defined
94+
95+
- name: Copy manila mount shares to /exports/cluster
96+
copy:
97+
content: "{{ os_manila_mount_shares | to_nice_yaml }}"
98+
dest: "/exports/cluster/manila_shares.yml"
99+
when: os_manila_mount_shares is defined
94100

95101
- name: Ensure /exports/cluster/cvmfs directory exists
96102
file:

0 commit comments

Comments
 (0)