Skip to content

Commit

Permalink
feat: option to enable cloud-init on rocky linux 9 and 8 (#895)
Browse files Browse the repository at this point in the history
- Added the cloud-init option for Rocky Linux 9.
- Added the cloud-init option for Rocky Linux 8.

Signed-off-by: Jared Burns <[email protected]>
  • Loading branch information
burnsjared0415 authored Apr 22, 2024
1 parent 83a1d37 commit b587054
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 5 deletions.
10 changes: 7 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@
[#877](https://github.com/vmware-samples/packer-examples-for-vsphere/pull/877)
- Adds option to enable cloud-init on Debian 12.
[#883](https://github.com/vmware-samples/packer-examples-for-vsphere/pull/883)
- Adds option to enabled cloud-init on Red Hat Enterprise Linux 9.
- Adds option to enable cloud-init on Red Hat Enterprise Linux 9.
[#888](https://github.com/vmware-samples/packer-examples-for-vsphere/pull/888)
- Adds option to enabled cloud-init on Red Hat Enterprise Linux 8.
- [#888](https://github.com/vmware-samples/packer-examples-for-vsphere/pull/888))
- Adds option to enable cloud-init on Red Hat Enterprise Linux 8.
[#888](https://github.com/vmware-samples/packer-examples-for-vsphere/pull/888)
- Adds option to enable cloud-init on Rocky Linux 9.
[#895](https://github.com/vmware-samples/packer-examples-for-vsphere/pull/895)
- Adds option to enable cloud-init on Rocky Linux 8.
[#895](https://github.com/vmware-samples/packer-examples-for-vsphere/pull/895)

## v0.19.1

Expand Down
2 changes: 2 additions & 0 deletions builds/linux/rocky/8/linux-rocky.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ locals {
vm_guest_os_language = var.vm_guest_os_language
vm_guest_os_keyboard = var.vm_guest_os_keyboard
vm_guest_os_timezone = var.vm_guest_os_timezone
vm_guest_os_cloudinit = var.vm_guest_os_cloudinit
network = templatefile("${abspath(path.root)}/data/network.pkrtpl.hcl", {
device = var.vm_network_device
ip = var.vm_ip_address
Expand Down Expand Up @@ -212,6 +213,7 @@ build {
"--extra-vars", "build_key='${var.build_key}'",
"--extra-vars", "ansible_username=${var.ansible_username}",
"--extra-vars", "ansible_key='${var.ansible_key}'",
"--extra-vars", "enable_cloudinit=${var.vm_guest_os_cloudinit}",
]
}

Expand Down
1 change: 1 addition & 0 deletions builds/linux/rocky/8/linux-rocky.pkrvars.hcl.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ vm_guest_os_version = "8.9"

// Virtual Machine Guest Operating System Setting
vm_guest_os_type = "other4xLinux64Guest"
vm_guest_os_cloudinit = false

// Virtual Machine Hardware Settings
vm_firmware = "efi"
Expand Down
6 changes: 6 additions & 0 deletions builds/linux/rocky/8/variables.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ variable "vm_guest_os_type" {
description = "The guest operating system type, also know as guestid."
}

variable "vm_guest_os_cloudinit" {
type = bool
description = "Enable cloud-init for the guest operating system."
default = false
}

variable "vm_firmware" {
type = string
description = "The virtual machine firmware."
Expand Down
2 changes: 2 additions & 0 deletions builds/linux/rocky/9/linux-rocky.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ locals {
vm_guest_os_language = var.vm_guest_os_language
vm_guest_os_keyboard = var.vm_guest_os_keyboard
vm_guest_os_timezone = var.vm_guest_os_timezone
vm_guest_os_cloudinit = var.vm_guest_os_cloudinit
network = templatefile("${abspath(path.root)}/data/network.pkrtpl.hcl", {
device = var.vm_network_device
ip = var.vm_ip_address
Expand Down Expand Up @@ -213,6 +214,7 @@ build {
"--extra-vars", "build_key='${var.build_key}'",
"--extra-vars", "ansible_username=${var.ansible_username}",
"--extra-vars", "ansible_key='${var.ansible_key}'",
"--extra-vars", "enable_cloudinit=${var.vm_guest_os_cloudinit}",
]
}

Expand Down
1 change: 1 addition & 0 deletions builds/linux/rocky/9/linux-rocky.pkrvars.hcl.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ vm_guest_os_version = "9.3"

// Virtual Machine Guest Operating System Setting
vm_guest_os_type = "other5xLinux64Guest"
vm_guest_os_cloudinit = false

// Virtual Machine Hardware Settings
vm_firmware = "efi"
Expand Down
6 changes: 6 additions & 0 deletions builds/linux/rocky/9/variables.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ variable "vm_guest_os_type" {
description = "The guest operating system type, also know as guestid."
}

variable "vm_guest_os_cloudinit" {
type = bool
description = "Enable cloud-init for the guest operating system."
default = false
}

variable "vm_firmware" {
type = string
description = "The virtual machine firmware."
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ This project supports the following guest operating systems:
| | 7 | :octicons-check-circle-24:{ .green } | :octicons-x-circle-24: | :octicons-check-circle-24:{ .green } | :octicons-check-circle-24:{ .green } |
| :fontawesome-brands-linux: &nbsp;&nbsp; AlmaLinux OS @span | 9 | :octicons-check-circle-24:{ .green } | :octicons-x-circle-24: | :octicons-check-circle-24:{ .green } | :octicons-check-circle-24:{ .green } |
| | 8 | :octicons-check-circle-24:{ .green } | :octicons-x-circle-24: | :octicons-check-circle-24:{ .green } | :octicons-check-circle-24:{ .green } |
| :simple-rockylinux: &nbsp;&nbsp; Rocky Linux @span | 9 | :octicons-check-circle-24:{ .green } | :octicons-x-circle-24: | :octicons-check-circle-24:{ .green } | :octicons-check-circle-24:{ .green } |
| | 8 | :octicons-check-circle-24:{ .green } | :octicons-x-circle-24: | :octicons-check-circle-24:{ .green } | :octicons-check-circle-24:{ .green } |
| :simple-rockylinux: &nbsp;&nbsp; Rocky Linux @span | 9 | :octicons-check-circle-24:{ .green } | :octicons-x-circle-24:{ .green } | :octicons-check-circle-24:{ .green } | :octicons-check-circle-24:{ .green } |
| | 8 | :octicons-check-circle-24:{ .green } | :octicons-x-circle-24:{ .green } | :octicons-check-circle-24:{ .green } | :octicons-check-circle-24:{ .green } |
| :simple-oracle: &nbsp;&nbsp; Oracle Linux @span | 9 | :octicons-check-circle-24:{ .green } | :octicons-x-circle-24: | :octicons-check-circle-24:{ .green } | :octicons-check-circle-24:{ .green } |
| | 8 | :octicons-check-circle-24:{ .green } | :octicons-x-circle-24: | :octicons-check-circle-24:{ .green } | :octicons-check-circle-24:{ .green } |
| :fontawesome-brands-centos: &nbsp;&nbsp; CentOS @span | 9 Stream | :octicons-check-circle-24:{ .green } | :octicons-x-circle-24: | :octicons-check-circle-24:{ .green } | :octicons-check-circle-24:{ .green } |
Expand Down

0 comments on commit b587054

Please sign in to comment.