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

feat: added cloud-init to oracle linux 8 and 9 #899

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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
[#898](https://github.com/vmware-samples/packer-examples-for-vsphere/pull/898)
- Adds option to enable cloud-init on AlmaLinux OS 9.
[#898](https://github.com/vmware-samples/packer-examples-for-vsphere/pull/898)
- Adds option to enable cloud-init on Oracle Linux 8.
[#899](https://github.com/vmware-samples/packer-examples-for-vsphere/pull/899)
- Adds option to enable cloud-init on Oracle Linux 9.
[#899](https://github.com/vmware-samples/packer-examples-for-vsphere/pull/899)

**Chore**:

Expand Down
2 changes: 2 additions & 0 deletions builds/linux/oracle/8/linux-oracle.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/oracle/8/linux-oracle.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 = "oracleLinux8_64Guest"
vm_guest_os_cloudinit = false

// Virtual Machine Hardware Settings
vm_firmware = "efi-secure"
Expand Down
6 changes: 6 additions & 0 deletions builds/linux/oracle/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/oracle/9/linux-oracle.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/oracle/9/linux-oracle.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-secure"
Expand Down
6 changes: 6 additions & 0 deletions builds/linux/oracle/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 @@ -31,8 +31,8 @@ This project supports the following guest operating systems:
| | 8 | :octicons-check-circle-24:{ .green } | :octicons-x-circle-24:{ .green } | :octicons-check-circle-24:{ .green } | :octicons-check-circle-24:{ .green } |
| :simple-rockylinux:    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:    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 } |
| :simple-oracle:    Oracle 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 } |
| :fontawesome-brands-centos:    CentOS @span | 9 Stream | :octicons-check-circle-24:{ .green } | :octicons-check-circle-24:{ .green } | :octicons-check-circle-24:{ .green } | :octicons-check-circle-24:{ .green } |
| | 8 Stream | :octicons-check-circle-24:{ .green } | :octicons-check-circle-24:{ .green } | :octicons-check-circle-24:{ .green } | :octicons-check-circle-24:{ .green } |
| | 7 | :octicons-check-circle-24:{ .green } | :octicons-x-circle-24: | :octicons-check-circle-24:{ .green } | :octicons-check-circle-24:{ .green } |
Expand Down