From 741e9f7dea9b69c10931bfb6e992ea22a0771afe Mon Sep 17 00:00:00 2001 From: Matt Williams Date: Tue, 31 Oct 2023 18:01:41 +0000 Subject: [PATCH] Pass the Ceph network through to Packer --- roles/packer/files/all.pkr.hcl | 3 ++- roles/packer/templates/variables.pkrvars.hcl.j2 | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/packer/files/all.pkr.hcl b/roles/packer/files/all.pkr.hcl index ee76ec36..9c6960f6 100644 --- a/roles/packer/files/all.pkr.hcl +++ b/roles/packer/files/all.pkr.hcl @@ -19,6 +19,7 @@ variable "oracle_access_cfg_file" {} variable "oracle_key_file" {} variable "openstack_network" {} +variable "openstack_ceph_network" {} variable "destination_image_name" {} variable "cluster" {} @@ -115,7 +116,7 @@ source "openstack" "openstack" { instance_name = "packer-${var.cluster}-v{{timestamp}}" source_image_name = "Rocky-8.8" ssh_username = var.ssh_username - networks = [var.openstack_network] + networks = [var.openstack_network, var.openstack_ceph_network] image_tags = ["compute"] metadata = {"cluster": var.cluster} } diff --git a/roles/packer/templates/variables.pkrvars.hcl.j2 b/roles/packer/templates/variables.pkrvars.hcl.j2 index a8990365..1039acdd 100644 --- a/roles/packer/templates/variables.pkrvars.hcl.j2 +++ b/roles/packer/templates/variables.pkrvars.hcl.j2 @@ -24,3 +24,4 @@ oracle_access_cfg_file = "/home/slurm/.oci/config" oracle_key_file = "/home/slurm/.oci/oci_api_key.pem" openstack_network = "{%- if startnode_config.network_id is defined -%}{{ startnode_config.network_id }}{%- endif -%}" +openstack_ceph_network = "{%- if startnode_config.ceph_network is defined -%}{{ startnode_config.ceph_network }}{%- endif -%}"