From 9567f6d2e12b8cfaef95b646a5747b6a6f7322c4 Mon Sep 17 00:00:00 2001 From: Bo-Chun Louis Chen <louistw@uab.edu> Date: Mon, 24 Jul 2023 16:55:34 -0500 Subject: [PATCH] Add compute playbook in gpu --- openstack-gpu/nodeimage.pkr.hcl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/openstack-gpu/nodeimage.pkr.hcl b/openstack-gpu/nodeimage.pkr.hcl index 7d3ed25..705ba96 100644 --- a/openstack-gpu/nodeimage.pkr.hcl +++ b/openstack-gpu/nodeimage.pkr.hcl @@ -18,6 +18,20 @@ source "openstack" "image" { build { sources = ["source.openstack.image"] + 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}'" + ] + } + provisioner "ansible" { groups = ["gpu"] playbook_file = "./ansible/gpu.yml" @@ -31,4 +45,10 @@ build { "--extra-vars", "root_ssh_key='${var.root_ssh_key}'" ] } + + provisioner "ansible" { + use_proxy = false + groups = ["compute"] + playbook_file = "./CRI_XCBC/compute-packer.yaml" + } } -- GitLab