Skip to content

Commit

Permalink
embed/terraform/modules/vm: Create .ssh directory if missing (#185)
Browse files Browse the repository at this point in the history
Signed-off-by: Din Music <din.music@din-cloud.com>
  • Loading branch information
MusicDin authored Apr 6, 2024
1 parent b9edda1 commit fc6a944
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion embed/terraform/modules/vm/vm.tf
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ resource "null_resource" "ssh_known_hosts" {
provisioner "local-exec" {
command = <<-EOF
sh ./scripts/filelock-exec.sh \
"touch $HOME/.ssh/known_hosts \
"mkdir -p $HOME/.ssh \
&& touch $HOME/.ssh/known_hosts \
&& ssh-keygen -R $VM_IP \
&& ssh-keyscan -t rsa $VM_IP | tee -a $HOME/.ssh/known_hosts \
&& rm -f $HOME/.ssh/known_hosts.old"
Expand Down

0 comments on commit fc6a944

Please sign in to comment.