Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make content_library_destination optional #44

Merged
merged 1 commit into from
Sep 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions builds/linux/almalinux-8/linux-almalinux.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
DESCRIPTION:
DESCRIPTION:
AlmaLinux 8 template using the Packer Builder for VMware vSphere (vsphere-iso).
*/

Expand Down Expand Up @@ -90,10 +90,13 @@ source "vsphere-iso" "linux-almalinux" {

// Template and Content Library Settings
convert_to_template = var.common_template_conversion
content_library_destination {
library = var.common_content_library_name
ovf = var.common_content_library_ovf
destroy = var.common_content_library_destroy
dynamic "content_library_destination" {
for_each = var.common_content_library_name != null ? [1] : []
content {
library = var.common_content_library_name
ovf = var.common_content_library_ovf
destroy = var.common_content_library_destroy
}
}
}

Expand Down
3 changes: 2 additions & 1 deletion builds/linux/almalinux-8/variables.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
DESCRIPTION:
DESCRIPTION:
AlmaLinux 8 variables using the Packer Builder for VMware vSphere (vsphere-iso).
*/

Expand Down Expand Up @@ -193,6 +193,7 @@ variable "common_template_conversion" {
variable "common_content_library_name" {
type = string
description = "The name of the target vSphere content library, if used. (e.g. 'sfo-w01-cl01-lib01')"
default = null
}

variable "common_content_library_ovf" {
Expand Down
13 changes: 8 additions & 5 deletions builds/linux/centos-linux-8/linux-centos-linux.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
DESCRIPTION:
DESCRIPTION:
CentOS Linux 8 template using the Packer Builder for VMware vSphere (vsphere-iso).
*/

Expand Down Expand Up @@ -90,10 +90,13 @@ source "vsphere-iso" "linux-centos-linux" {

// Template and Content Library Settings
convert_to_template = var.common_template_conversion
content_library_destination {
library = var.common_content_library_name
ovf = var.common_content_library_ovf
destroy = var.common_content_library_destroy
dynamic "content_library_destination" {
for_each = var.common_content_library_name != null ? [1] : []
content {
library = var.common_content_library_name
ovf = var.common_content_library_ovf
destroy = var.common_content_library_destroy
}
}
}

Expand Down
3 changes: 2 additions & 1 deletion builds/linux/centos-linux-8/variables.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
DESCRIPTION:
DESCRIPTION:
CentOS Linux 8 variables using the Packer Builder for VMware vSphere (vsphere-iso).
*/

Expand Down Expand Up @@ -193,6 +193,7 @@ variable "common_template_conversion" {
variable "common_content_library_name" {
type = string
description = "The name of the target vSphere content library, if used. (e.g. 'sfo-w01-cl01-lib01')"
default = null
}

variable "common_content_library_ovf" {
Expand Down
13 changes: 8 additions & 5 deletions builds/linux/centos-stream-8/linux-centos-stream.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
DESCRIPTION:
DESCRIPTION:
CentOS Stream 8 template using the Packer Builder for VMware vSphere (vsphere-iso).
*/

Expand Down Expand Up @@ -90,10 +90,13 @@ source "vsphere-iso" "linux-centos-stream" {

// Template and Content Library Settings
convert_to_template = var.common_template_conversion
content_library_destination {
library = var.common_content_library_name
ovf = var.common_content_library_ovf
destroy = var.common_content_library_destroy
dynamic "content_library_destination" {
for_each = var.common_content_library_name != null ? [1] : []
content {
library = var.common_content_library_name
ovf = var.common_content_library_ovf
destroy = var.common_content_library_destroy
}
}
}

Expand Down
3 changes: 2 additions & 1 deletion builds/linux/centos-stream-8/variables.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
DESCRIPTION:
DESCRIPTION:
CentOS Stream 8 variables using the Packer Builder for VMware vSphere (vsphere-iso).
*/

Expand Down Expand Up @@ -193,6 +193,7 @@ variable "common_template_conversion" {
variable "common_content_library_name" {
type = string
description = "The name of the target vSphere content library, if used. (e.g. 'sfo-w01-cl01-lib01')"
default = null
}

variable "common_content_library_ovf" {
Expand Down
15 changes: 9 additions & 6 deletions builds/linux/photon-4/linux-photon.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
DESCRIPTION:
DESCRIPTION:
VMware Photon OS 4 template using the Packer Builder for VMware vSphere (vsphere-iso).
*/

Expand Down Expand Up @@ -91,10 +91,13 @@ source "vsphere-iso" "linux-photon" {

// Template and Content Library Settings
convert_to_template = var.common_template_conversion
content_library_destination {
library = var.common_content_library_name
ovf = var.common_content_library_ovf
destroy = var.common_content_library_destroy
dynamic "content_library_destination" {
for_each = var.common_content_library_name != null ? [1] : []
content {
library = var.common_content_library_name
ovf = var.common_content_library_ovf
destroy = var.common_content_library_destroy
}
}
}

Expand All @@ -108,7 +111,7 @@ build {
destination = "/tmp/root-ca.crt"
source = "../../../certificates/root-ca.crt"
}

provisioner "shell" {
execute_command = "echo '${var.build_password}' | {{.Vars}} sudo -E -S sh -eux '{{.Path}}'"
environment_vars = [
Expand Down
3 changes: 2 additions & 1 deletion builds/linux/photon-4/variables.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
DESCRIPTION:
DESCRIPTION:
VMware Photon OS 4 variables using the Packer Builder for VMware vSphere (vsphere-iso).
*/

Expand Down Expand Up @@ -175,6 +175,7 @@ variable "common_template_conversion" {
variable "common_content_library_name" {
type = string
description = "The name of the target vSphere content library, if used. (e.g. 'sfo-w01-cl01-lib01')"
default = null
}

variable "common_content_library_ovf" {
Expand Down
13 changes: 8 additions & 5 deletions builds/linux/redhat-linux-8/linux-redhat-linux.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
DESCRIPTION:
DESCRIPTION:
Red Hat Enterprise Linux 8 template using the Packer Builder for VMware vSphere (vsphere-iso).
*/

Expand Down Expand Up @@ -90,10 +90,13 @@ source "vsphere-iso" "linux-redhat-linux" {

// Template and Content Library Settings
convert_to_template = var.common_template_conversion
content_library_destination {
library = var.common_content_library_name
ovf = var.common_content_library_ovf
destroy = var.common_content_library_destroy
dynamic "content_library_destination" {
for_each = var.common_content_library_name != null ? [1] : []
content {
library = var.common_content_library_name
ovf = var.common_content_library_ovf
destroy = var.common_content_library_destroy
}
}
}

Expand Down
3 changes: 2 additions & 1 deletion builds/linux/redhat-linux-8/variables.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
DESCRIPTION:
DESCRIPTION:
Red Hat Enterprise Linux 8 variables using the Packer Builder for VMware vSphere (vsphere-iso).
*/

Expand Down Expand Up @@ -207,6 +207,7 @@ variable "common_template_conversion" {
variable "common_content_library_name" {
type = string
description = "The name of the target vSphere content library, if used. (e.g. 'sfo-w01-cl01-lib01')"
default = null
}

variable "common_content_library_ovf" {
Expand Down
13 changes: 8 additions & 5 deletions builds/linux/rocky-linux-8/linux-rocky-linux.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
DESCRIPTION:
DESCRIPTION:
Rocky Linux 8 template using the Packer Builder for VMware vSphere (vsphere-iso).
*/

Expand Down Expand Up @@ -90,10 +90,13 @@ source "vsphere-iso" "linux-rocky-linux" {

// Template and Content Library Settings
convert_to_template = var.common_template_conversion
content_library_destination {
library = var.common_content_library_name
ovf = var.common_content_library_ovf
destroy = var.common_content_library_destroy
dynamic "content_library_destination" {
for_each = var.common_content_library_name != null ? [1] : []
content {
library = var.common_content_library_name
ovf = var.common_content_library_ovf
destroy = var.common_content_library_destroy
}
}
}

Expand Down
3 changes: 2 additions & 1 deletion builds/linux/rocky-linux-8/variables.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
DESCRIPTION:
DESCRIPTION:
Rocky Linux 8 variables using the Packer Builder for VMware vSphere (vsphere-iso).
*/

Expand Down Expand Up @@ -193,6 +193,7 @@ variable "common_template_conversion" {
variable "common_content_library_name" {
type = string
description = "The name of the target vSphere content library, if used. (e.g. 'sfo-w01-cl01-lib01')"
default = null
}

variable "common_content_library_ovf" {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
DESCRIPTION:
DESCRIPTION:
Ubuntu Server 18.04 LTS template using the Packer Builder for VMware vSphere (vsphere-iso).
*/

Expand Down Expand Up @@ -103,10 +103,13 @@ source "vsphere-iso" "linux-ubuntu-server" {

// Template and Content Library Settings
convert_to_template = var.common_template_conversion
content_library_destination {
library = var.common_content_library_name
ovf = var.common_content_library_ovf
destroy = var.common_content_library_destroy
dynamic "content_library_destination" {
for_each = var.common_content_library_name != null ? [1] : []
content {
library = var.common_content_library_name
ovf = var.common_content_library_ovf
destroy = var.common_content_library_destroy
}
}
}

Expand Down
3 changes: 2 additions & 1 deletion builds/linux/ubuntu-server-18-04-lts/variables.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
DESCRIPTION:
DESCRIPTION:
Ubuntu Server 18.04 LTS variables using the Packer Builder for VMware vSphere (vsphere-iso).
*/

Expand Down Expand Up @@ -193,6 +193,7 @@ variable "common_template_conversion" {
variable "common_content_library_name" {
type = string
description = "The name of the target vSphere content library, if used. (e.g. 'sfo-w01-cl01-lib01')"
default = null
}

variable "common_content_library_ovf" {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
DESCRIPTION:
DESCRIPTION:
Ubuntu Server 20.04 LTS template using the Packer Builder for VMware vSphere (vsphere-iso).
*/

Expand Down Expand Up @@ -91,10 +91,13 @@ source "vsphere-iso" "linux-ubuntu-server" {

// Template and Content Library Settings
convert_to_template = var.common_template_conversion
content_library_destination {
library = var.common_content_library_name
ovf = var.common_content_library_ovf
destroy = var.common_content_library_destroy
dynamic "content_library_destination" {
for_each = var.common_content_library_name != null ? [1] : []
content {
library = var.common_content_library_name
ovf = var.common_content_library_ovf
destroy = var.common_content_library_destroy
}
}
}

Expand Down
3 changes: 2 additions & 1 deletion builds/linux/ubuntu-server-20-04-lts/variables.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
DESCRIPTION:
DESCRIPTION:
Ubuntu Server 20.04 LTS variables using the Packer Builder for VMware vSphere (vsphere-iso).
*/

Expand Down Expand Up @@ -193,6 +193,7 @@ variable "common_template_conversion" {
variable "common_content_library_name" {
type = string
description = "The name of the target vSphere content library, if used. (e.g. 'sfo-w01-cl01-lib01')"
default = null
}

variable "common_content_library_ovf" {
Expand Down
3 changes: 2 additions & 1 deletion builds/windows/windows-server-2016/variables.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
DESCRIPTION:
DESCRIPTION:
Microsoft Windows Server 2016 Standard variables using the Packer Builder for VMware vSphere (vsphere-iso).
*/

Expand Down Expand Up @@ -217,6 +217,7 @@ variable "common_template_conversion" {
variable "common_content_library_name" {
type = string
description = "The name of the target vSphere content library, if used. (e.g. 'sfo-w01-cl01-lib01')"
default = null
}

variable "common_content_library_ovf" {
Expand Down
Loading