From 67a2fa9aab3fe22c3ca7dd3a1db1db036d92a3f5 Mon Sep 17 00:00:00 2001
From: Krish Moodbidri <krish94@uab.edu>
Date: Wed, 4 Dec 2024 14:53:03 -0600
Subject: [PATCH] added playbook file base.yml in compute node build

---
 openstack-compute/nodeimage.pkr.hcl | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/openstack-compute/nodeimage.pkr.hcl b/openstack-compute/nodeimage.pkr.hcl
index 15941ba..0df7158 100644
--- a/openstack-compute/nodeimage.pkr.hcl
+++ b/openstack-compute/nodeimage.pkr.hcl
@@ -36,6 +36,17 @@ source "openstack" "image" {
 build {
   sources = ["source.openstack.image"]
 
+  provisioner "ansible" {
+    use_proxy     = false
+    user          = var.ssh_username
+    groups        = ["base"]
+    playbook_file = "./ansible/base.yml"
+    roles_path    = "./ansible/roles"
+    extra_arguments = [
+      "--extra-vars", "root_ssh_key='${var.root_ssh_key}'"
+    ]
+  }
+  
   provisioner "ansible" {
     use_proxy     = false
     user          = var.ssh_username
-- 
GitLab