Skip to content

Commit 252ff34

Browse files
committed
prevent ssh host key acceptance prompt in OOD shell
1 parent 35ba408 commit 252ff34

File tree

1 file changed

+13
-0
lines changed
  • ansible/roles/openondemand/tasks

1 file changed

+13
-0
lines changed

ansible/roles/openondemand/tasks/main.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,16 @@
128128
# loop:
129129
# - /var/www/ood/public
130130
# - /usr/share/ondemand-dex/web/themes/
131+
132+
- name: Keyscan login host
133+
command:
134+
cmd: "ssh-keyscan -t ssh-ed25519 {{ openondemand_clusters.slurm.v2.login.host }}"
135+
register: _openondemand_login_key
136+
137+
- name: Add login hostkey to known hosts
138+
copy:
139+
dest: /etc/ssh/known_hosts
140+
content: "{{ _openondemand_login_key.stdout }}"
141+
owner: root
142+
group: root
143+
mode: o=rw,go=r

0 commit comments

Comments
 (0)