From e59f35f9fcdd6fab2377df7872aa19615f53df8b Mon Sep 17 00:00:00 2001 From: Eesaan Atluri <atlurie@uab.edu> Date: Thu, 24 Oct 2024 11:35:24 -0500 Subject: [PATCH] feat: Options for verbosity,debug ansible provisioner --- openstack-proxy/nodeimage.pkr.hcl | 8 +++++++- openstack-proxy/variables.pkr.hcl | 12 ++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/openstack-proxy/nodeimage.pkr.hcl b/openstack-proxy/nodeimage.pkr.hcl index 8d700c06..18c195e5 100644 --- a/openstack-proxy/nodeimage.pkr.hcl +++ b/openstack-proxy/nodeimage.pkr.hcl @@ -47,7 +47,13 @@ build { use_proxy = false user = var.ssh_username groups = ["proxy"] - ansible_env_vars = ["ANSIBLE_TIMEOUT=60", "ANSIBLE_HOST_KEY_CHECKING=False"] + ansible_env_vars = [ + "ANSIBLE_TIMEOUT=60", + "ANSIBLE_HOST_KEY_CHECKING=False", + "ANSIBLE_VERBOSITY=${var.ANSIBLE_VERBOSITY}", + "ANSIBLE_DEBUG=${var.ANSIBLE_DEBUG}", + "ANSIBLE_FORCE_COLOR=true" + ] playbook_file = "./CRI_XCBC/proxy.yaml" } } diff --git a/openstack-proxy/variables.pkr.hcl b/openstack-proxy/variables.pkr.hcl index 8e78a5db..9215362d 100644 --- a/openstack-proxy/variables.pkr.hcl +++ b/openstack-proxy/variables.pkr.hcl @@ -94,3 +94,15 @@ variable "volume_size" { description = "The default volume size for building iamge" } +variable "ANSIBLE_DEBUG" { + type = string + default = "false" + description = "to turn on debugging" +} + +variable "ANSIBLE_VERBOSITY" { + type = string + default = "0" + description = "to increase verbosity - 0|1|2|3|4" +} + -- GitLab