From 43c1b12fe5b0ab99cbbe0773471ad57a89b0fe8d Mon Sep 17 00:00:00 2001
From: Bo-Chun Louis Chen <louistw@uab.edu>
Date: Fri, 2 Sep 2022 10:51:11 -0500
Subject: [PATCH] Remove keypair and private key from from openstack module

---
 openstack/nodeimage.pkr.hcl |  5 -----
 openstack/variables.pkr.hcl | 10 ----------
 2 files changed, 15 deletions(-)

diff --git a/openstack/nodeimage.pkr.hcl b/openstack/nodeimage.pkr.hcl
index 5cc075a..576057b 100644
--- a/openstack/nodeimage.pkr.hcl
+++ b/openstack/nodeimage.pkr.hcl
@@ -17,9 +17,6 @@ source "openstack" "image" {
   security_groups = var.security_groups
 
   ssh_username = var.ssh_username
-  ssh_keypair_name = var.ssh_keypair_name
-  ssh_private_key_file = var.ssh_private_key_file
-
 }
 
 build {
@@ -34,14 +31,12 @@ build {
   }
   provisioner "ansible" {
     use_proxy =  false
-    ssh_authorized_key_file = "/home/ubuntu/.ssh/id_rsa.pub"
     ansible_env_vars = ["ANSIBLE_HOST_KEY_CHECKING=False"]
     playbook_file = "../CRI_XCBC/ood-packer.yaml"
     roles_path = "./ansible/roles"
     inventory_file = "../CRI_XCBC/hosts"
     extra_arguments = [
       "--extra-vars", "root_ssh_key='${var.root_ssh_key}'",
-      "--private-key=${var.ssh_private_key_file}",
       "--user=centos",
       #"-vvvv"
     ]
diff --git a/openstack/variables.pkr.hcl b/openstack/variables.pkr.hcl
index 175ca17..5082805 100644
--- a/openstack/variables.pkr.hcl
+++ b/openstack/variables.pkr.hcl
@@ -76,13 +76,3 @@ variable "ssh_username" {
   default = "centos"
   description = "The default username to use for SSH"
 }
-
-variable "ssh_keypair_name" {
-  type = string
-  description = "SSH keypair to use from OS project"
-}
-
-variable "ssh_private_key_file" {
-  type = string
-  description = "Private key file"
-}
-- 
GitLab