diff --git a/openstack-compute/nodeimage.pkr.hcl b/openstack-compute/nodeimage.pkr.hcl index e6f39d8a3e93dbb83f95e0f57e4ded5a08e32aed..c10e095f5d418e51e42cbe38f82fd5f9b67c9d07 100644 --- a/openstack-compute/nodeimage.pkr.hcl +++ b/openstack-compute/nodeimage.pkr.hcl @@ -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}'" ] } diff --git a/openstack-gpu/nodeimage.pkr.hcl b/openstack-gpu/nodeimage.pkr.hcl index 02720c2d434a2c6a70a79deae9fb37716869c171..7d3ed258d138b3ad3605b9b11e56bb7d2eef4b9a 100644 --- a/openstack-gpu/nodeimage.pkr.hcl +++ b/openstack-gpu/nodeimage.pkr.hcl @@ -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}'" ] } diff --git a/openstack/nodeimage.pkr.hcl b/openstack/nodeimage.pkr.hcl index 509ae3cde0684fd1a02a913ae760d8ae737c419e..7988088e8fba1b6dd664a5b12b4d3bd557e4cb1a 100644 --- a/openstack/nodeimage.pkr.hcl +++ b/openstack/nodeimage.pkr.hcl @@ -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}'" ] }