Skip to content

Commit 966927c

Browse files
committed
now persists hostkeys on ood/login by default
1 parent 8c979cd commit 966927c

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

ansible/roles/persist_hostkeys/tasks/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
- name: Ensure hostkeys directory exists on persistent storage
44
file:
5-
path: "{{ appliances_state_dir }}/hostkeys/{{ inventory_hostname }}"
5+
path: "/mnt/hostkeys/{{ inventory_hostname }}"
66
state: directory
77
owner: root
88
group: root
@@ -11,7 +11,7 @@
1111
- name: Copy hostkeys from persistent storage
1212
# won't fail if no keys are in persistent storage
1313
copy:
14-
src: "{{ appliances_state_dir }}/hostkeys/{{ inventory_hostname }}/"
14+
src: "/mnt/hostkeys/{{ inventory_hostname }}/"
1515
dest: /etc/ssh/
1616
remote_src: true
1717

@@ -23,7 +23,7 @@
2323

2424
- name: Persist hostkeys
2525
copy:
26-
dest: "{{ appliances_state_dir }}/hostkeys/{{ inventory_hostname }}/"
26+
dest: "/mnt/hostkeys/{{ inventory_hostname }}/"
2727
src: "{{ item }}"
2828
remote_src: true
2929
mode: preserve

environments/common/inventory/group_vars/all/nfs.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,12 @@ nfs_configurations:
2121
server: "{{ inventory_hostname in groups['control'] }}"
2222
clients: false
2323
nfs_export: "/exports/cluster"
24+
25+
- comment: Export hostkeys from Slurm control node to OOD
26+
nfs_enable:
27+
server: "{{ inventory_hostname in groups['control'] }}"
28+
clients: "{{ inventory_hostname in groups['openondemand'] or inventory_hostname in groups['login'] }}"
29+
nfs_export: "{{ appliances_state_dir | default('/var/lib/state') }}/hostkeys"
30+
nfs_server: "{{ nfs_server_default }}"
31+
nfs_client_mnt_point: "/mnt/hostkeys"
32+
nfs_client_mnt_options: "x-systemd.required-by=zenith-ood.service,x-systemd.before=zenith-ood.service"

environments/common/layouts/everything

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,10 @@ openhpc
6969
[manila]
7070
# Hosts to configure for manila fileshares
7171

72-
[persist_hostkeys]
72+
[persist_hostkeys:children]
7373
# Hosts to persist hostkeys for across reimaging. NB: Requires appliances_state_dir on hosts.
74+
login
75+
openondemand
7476

7577
[squid]
7678
# Hosts to run squid proxy

0 commit comments

Comments
 (0)