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

refactor: updating linux pkr.hcl #944

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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
33 changes: 32 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,40 @@

**Bug Fix**:

- Updates to debian.yml file to remove the disable flag on cloud-init for ubuntu 24.04 LTS version
- Updates to debian.yml file to remove the disable flag on cloud-init for ubuntu 24.04 LTS version.
[#940](https://github.com/vmware-samples/packer-examples-for-vsphere/pull/940)
- Updates to debian.yml file to fix cloud-init install issue and addtional package issue.
[#944](https://github.com/vmware-samples/packer-examples-for-vsphere/pull/944)

**Enhancement**:

- Updates Alma Linux removed duplicate variables from example pkr.hcl file and updated variables.pkr.hcl file with defaults.
[#944](https://github.com/vmware-samples/packer-examples-for-vsphere/pull/944)
- Updates Centos Linux removed duplicate variables from example pkr.hcl file and updated variables.pkr.hcl file with defaults.
[#944](https://github.com/vmware-samples/packer-examples-for-vsphere/pull/944)
- Updates Debian Linux removed duplicate variables from example pkr.hcl file and updated variables.pkr.hcl file with defaults.
[#944](https://github.com/vmware-samples/packer-examples-for-vsphere/pull/944)
- Updates Fedora Linux removed duplicate variables from example pkr.hcl file and updated variables.pkr.hcl file with defaults.
[#944](https://github.com/vmware-samples/packer-examples-for-vsphere/pull/944)
- Updates Oracle Linux removed duplicate variables from example pkr.hcl file and updated variables.pkr.hcl file with defaults.
[#944](https://github.com/vmware-samples/packer-examples-for-vsphere/pull/944)
- Updates Photon Linux removed duplicate variables from example pkr.hcl file and updated variables.pkr.hcl file with defaults.
[#944](https://github.com/vmware-samples/packer-examples-for-vsphere/pull/944)
- Updates Red Hat Linux Enterprise removed duplicate variables from example pkr.hcl file and updated variables.pkr.hcl file with defaults.
[#944](https://github.com/vmware-samples/packer-examples-for-vsphere/pull/944)
- Updates Rocky Linux removed duplicate variables from example pkr.hcl file and updated variables.pkr.hcl file with defaults.
[#944](https://github.com/vmware-samples/packer-examples-for-vsphere/pull/944)
- Updates SUSE Linux removed duplicate variables from example pkr.hcl file and updated variables.pkr.hcl file with defaults.
[#944](https://github.com/vmware-samples/packer-examples-for-vsphere/pull/944)
- Updates Ubuntu Linux removed duplicate variables from example pkr.hcl file and updated variables.pkr.hcl file with defaults.
[#944](https://github.com/vmware-samples/packer-examples-for-vsphere/pull/944)

**Chore**:

- Removed Red Hat Enterprise Linux 7 release.
[#944](https://github.com/vmware-samples/packer-examples-for-vsphere/pull/944)
- Updates Rocky Linux 8.9 to 8.10 release.
[#944](https://github.com/vmware-samples/packer-examples-for-vsphere/pull/944)

## v0.20.0

Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/base/tasks/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

# Tasks for updating the operating system and installing additional packages.
- name: Updating the operating system and installing additional packages.
when: enable_cloudinit == 'true' and ansible_distribution_version | int >= 12
block:
- name: Getting guest operating system information.
ansible.builtin.debug:
Expand All @@ -17,10 +16,11 @@

- name: Installing additional packages.
ansible.builtin.apt:
name: "{{ base_base_base_additional_packages[ansible_os_family] }}"
name: "{{ base_additional_packages[ansible_os_family] }}"
state: latest # noqa package-latest

- name: Installing cloud-init.
ansible.builtin.apt:
name: cloud-init
state: latest # noqa package-latest
when: enable_cloudinit == 'true' and ansible_distribution_version | int >= 12
23 changes: 0 additions & 23 deletions builds/linux/centos/7/linux-centos.pkrvars.hcl.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
*/

// Guest Operating System Metadata
vm_guest_os_language = "en_US"
vm_guest_os_keyboard = "us"
vm_guest_os_timezone = "UTC"
vm_guest_os_family = "linux"
vm_guest_os_name = "centos"
vm_guest_os_version = "7"

Expand All @@ -19,27 +15,8 @@ vm_guest_os_type = "centos7_64Guest"

// Virtual Machine Hardware Settings
vm_firmware = "efi-secure"
vm_cdrom_type = "sata"
vm_cdrom_count = 1
vm_cpu_count = 2
vm_cpu_cores = 1
vm_cpu_hot_add = false
vm_mem_size = 2048
vm_mem_hot_add = false
vm_disk_size = 40960
vm_disk_controller_type = ["pvscsi"]
vm_disk_thin_provisioned = true
vm_network_card = "vmxnet3"

// Removable Media Settings
iso_datastore_path = "iso/linux/centos"
iso_content_library_item = "CentOS-7-x86_64-DVD-2009"
iso_file = "CentOS-7-x86_64-DVD-2009.iso"

// Boot Settings
vm_boot_order = "disk,cdrom"
vm_boot_wait = "2s"

// Communicator Settings
communicator_port = 22
communicator_timeout = "30m"
10 changes: 9 additions & 1 deletion builds/linux/centos/7/variables.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ variable "vm_guest_os_timezone" {
variable "vm_guest_os_family" {
type = string
description = "The guest operating system family. Used for naming and VMware Tools."
default = "linux"
}

variable "vm_guest_os_name" {
Expand Down Expand Up @@ -142,11 +143,13 @@ variable "vm_cdrom_count" {
variable "vm_cpu_count" {
type = number
description = "The number of virtual CPUs."
default = 2
}

variable "vm_cpu_cores" {
type = number
description = "The number of virtual CPUs cores per socket."
default = 1
}

variable "vm_cpu_hot_add" {
Expand All @@ -158,6 +161,7 @@ variable "vm_cpu_hot_add" {
variable "vm_mem_size" {
type = number
description = "The size for the virtual memory in MB."
default = 2048
}

variable "vm_mem_hot_add" {
Expand All @@ -169,6 +173,7 @@ variable "vm_mem_hot_add" {
variable "vm_disk_size" {
type = number
description = "The size for the virtual disk in MB."
default = 40960
}

variable "vm_disk_controller_type" {
Expand Down Expand Up @@ -323,6 +328,7 @@ variable "vm_boot_order" {
variable "vm_boot_wait" {
type = string
description = "The time to wait before boot."
default = "2s"
}

variable "common_ip_wait_timeout" {
Expand Down Expand Up @@ -393,13 +399,15 @@ variable "communicator_proxy_password" {
}

variable "communicator_port" {
type = string
type = number
description = "The port for the communicator protocol."
default = 22
}

variable "communicator_timeout" {
type = string
description = "The timeout for the communicator protocol."
default = "30m"
}

// Ansible Credentials
Expand Down
24 changes: 0 additions & 24 deletions builds/linux/centos/9/linux-centos-stream.pkrvars.hcl.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,16 @@
*/

// Guest Operating System Metadata
vm_guest_os_language = "en_US"
vm_guest_os_keyboard = "us"
vm_guest_os_timezone = "UTC"
vm_guest_os_family = "linux"
vm_guest_os_name = "centos-stream"
vm_guest_os_version = "9"

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

// Virtual Machine Hardware Settings
vm_firmware = "efi-secure"
vm_cdrom_type = "sata"
vm_cdrom_count = 1
vm_cpu_count = 2
vm_cpu_cores = 1
vm_cpu_hot_add = false
vm_mem_size = 2048
vm_mem_hot_add = false
vm_disk_size = 40960
vm_disk_controller_type = ["pvscsi"]
vm_disk_thin_provisioned = true
vm_network_card = "vmxnet3"

// Removable Media Settings
iso_datastore_path = "iso/linux/centos"
iso_content_library_item = "CentOS-Stream-9-latest-x86_64-dvd1"
iso_file = "CentOS-Stream-9-latest-x86_64-dvd1.iso"

// Boot Settings
vm_boot_order = "disk,cdrom"
vm_boot_wait = "2s"

// Communicator Settings
communicator_port = 22
communicator_timeout = "30m"
10 changes: 9 additions & 1 deletion builds/linux/centos/9/variables.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ variable "vm_guest_os_timezone" {
variable "vm_guest_os_family" {
type = string
description = "The guest operating system family. Used for naming and VMware Tools."
default = "linux"
}

variable "vm_guest_os_name" {
Expand Down Expand Up @@ -148,11 +149,13 @@ variable "vm_cdrom_count" {
variable "vm_cpu_count" {
type = number
description = "The number of virtual CPUs."
default = 2
}

variable "vm_cpu_cores" {
type = number
description = "The number of virtual CPUs cores per socket."
default = 1
}

variable "vm_cpu_hot_add" {
Expand All @@ -164,6 +167,7 @@ variable "vm_cpu_hot_add" {
variable "vm_mem_size" {
type = number
description = "The size for the virtual memory in MB."
default = 2048
}

variable "vm_mem_hot_add" {
Expand All @@ -175,6 +179,7 @@ variable "vm_mem_hot_add" {
variable "vm_disk_size" {
type = number
description = "The size for the virtual disk in MB."
default = 40960
}

variable "vm_disk_controller_type" {
Expand Down Expand Up @@ -329,6 +334,7 @@ variable "vm_boot_order" {
variable "vm_boot_wait" {
type = string
description = "The time to wait before boot."
default = "2s"
}

variable "common_ip_wait_timeout" {
Expand Down Expand Up @@ -399,13 +405,15 @@ variable "communicator_proxy_password" {
}

variable "communicator_port" {
type = string
type = number
description = "The port for the communicator protocol."
default = 22
}

variable "communicator_timeout" {
type = string
description = "The timeout for the communicator protocol."
default = "30m"
}

// Ansible Credentials
Expand Down
22 changes: 0 additions & 22 deletions builds/linux/debian/11/linux-debian.pkrvars.hcl.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
*/

// Guest Operating System Metadata
vm_guest_os_language = "en_US"
vm_guest_os_keyboard = "us"
vm_guest_os_timezone = "UTC"
vm_guest_os_family = "linux"
vm_guest_os_name = "debian"
vm_guest_os_version = "11.9"

Expand All @@ -19,27 +15,9 @@ vm_guest_os_type = "other5xLinux64Guest"

// Virtual Machine Hardware Settings
vm_firmware = "efi-secure"
vm_cdrom_type = "sata"
vm_cdrom_count = 1
vm_cpu_count = 2
vm_cpu_cores = 1
vm_cpu_hot_add = false
vm_mem_size = 2048
vm_mem_hot_add = false
vm_disk_size = 40960
vm_disk_controller_type = ["pvscsi"]
vm_disk_thin_provisioned = true
vm_network_card = "vmxnet3"

// Removable Media Settings
iso_datastore_path = "iso/linux/debian"
iso_content_library_item = "debian-11.9.0-amd64-netinst"
iso_file = "debian-11.9.0-amd64-netinst.iso"

// Boot Settings
vm_boot_order = "-"
vm_boot_wait = "5s"

// Communicator Settings
communicator_port = 22
communicator_timeout = "30m"
10 changes: 9 additions & 1 deletion builds/linux/debian/11/variables.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ variable "vm_guest_os_timezone" {
variable "vm_guest_os_family" {
type = string
description = "The guest operating system family. Used for naming."
default = "linux"
}

variable "vm_guest_os_name" {
Expand Down Expand Up @@ -143,11 +144,13 @@ variable "vm_cdrom_count" {
variable "vm_cpu_count" {
type = number
description = "The number of virtual CPUs."
default = 2
}

variable "vm_cpu_cores" {
type = number
description = "The number of virtual CPUs cores per socket."
default = 1
}

variable "vm_cpu_hot_add" {
Expand All @@ -159,6 +162,7 @@ variable "vm_cpu_hot_add" {
variable "vm_mem_size" {
type = number
description = "The size for the virtual memory in MB."
default = 2048
}

variable "vm_mem_hot_add" {
Expand All @@ -170,6 +174,7 @@ variable "vm_mem_hot_add" {
variable "vm_disk_size" {
type = number
description = "The size for the virtual disk in MB."
default = 40960
}

variable "vm_disk_controller_type" {
Expand Down Expand Up @@ -324,6 +329,7 @@ variable "vm_boot_order" {
variable "vm_boot_wait" {
type = string
description = "The time to wait before boot."
default = "5s"
}

variable "common_ip_wait_timeout" {
Expand Down Expand Up @@ -394,13 +400,15 @@ variable "communicator_proxy_password" {
}

variable "communicator_port" {
type = string
type = number
description = "The port for the communicator protocol."
default = 22
}

variable "communicator_timeout" {
type = string
description = "The timeout for the communicator protocol."
default = "30m"
}

// Ansible Credentials
Expand Down
Loading