Skip to content
Snippets Groups Projects
Commit 3b5b4e73 authored by Eesaan Atluri's avatar Eesaan Atluri
Browse files

Allow using RSA keys when packer ssh communicator tries to ssh.

Latest versions of packer removed ssh-rsa keys from accepted methods of
publickey auth. This commit is a workaround to allow ssh-rsa to be used
for ssh by packer communicator to ssh into build instance.
This should be fixed in the upcoming iterations to use correct methods
like ssh-ecdsa etc.
parent 94ce1b0a
No related branches found
No related tags found
2 merge requests!63Fix compute and GPU img builds,!61Fix packer ssh communicator errors.
Pipeline #8038 failed with stages
in 45 minutes and 47 seconds
......@@ -25,8 +25,13 @@ build {
provisioner "ansible" {
groups = ["compute"]
playbook_file = "./ansible/compute.yml"
ansible_env_vars = [
"ANSIBLE_SSH_ARGS='-oHostKeyAlgorithms=+ssh-rsa -oPubkeyAcceptedKeyTypes=ssh-rsa'",
"ANSIBLE_HOST_KEY_CHECKING=False"
]
roles_path = "./ansible/roles"
extra_arguments = [
"--scp-extra-args", "'-O'",
"--extra-vars", "root_ssh_key='${var.root_ssh_key}'"
]
}
......
......@@ -21,8 +21,13 @@ build {
provisioner "ansible" {
groups = ["gpu"]
playbook_file = "./ansible/gpu.yml"
ansible_env_vars = [
"ANSIBLE_SSH_ARGS='-oHostKeyAlgorithms=+ssh-rsa -oPubkeyAcceptedKeyTypes=ssh-rsa'",
"ANSIBLE_HOST_KEY_CHECKING=False"
]
roles_path = "./ansible/roles"
extra_arguments = [
"--scp-extra-args", "'-O'",
"--extra-vars", "root_ssh_key='${var.root_ssh_key}'"
]
}
......
......@@ -26,8 +26,13 @@ build {
user = var.ssh_username
groups = ["base"]
playbook_file = "./ansible/base.yml"
ansible_env_vars = [
"ANSIBLE_SSH_ARGS='-oHostKeyAlgorithms=+ssh-rsa -oPubkeyAcceptedKeyTypes=ssh-rsa'",
"ANSIBLE_HOST_KEY_CHECKING=False"
]
roles_path = "./ansible/roles"
extra_arguments = [
"--scp-extra-args", "'-O'",
"--extra-vars", "root_ssh_key='${var.root_ssh_key}'"
]
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment