Skip to content

Commit

Permalink
Pass the Ceph network through to Packer
Browse files Browse the repository at this point in the history
  • Loading branch information
milliams committed Oct 31, 2023
1 parent ef5010d commit 741e9f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion roles/packer/files/all.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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" {}
Expand Down Expand Up @@ -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}
}
Expand Down
1 change: 1 addition & 0 deletions roles/packer/templates/variables.pkrvars.hcl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 -%}"

0 comments on commit 741e9f7

Please sign in to comment.