From 6e80b4fca6becb8fe067a7b2345249c619bb878e Mon Sep 17 00:00:00 2001 From: goffinet Date: Sun, 20 Oct 2024 22:25:56 +0200 Subject: [PATCH] Add Rocky 9 --- README.md | 4 +++- imagename | 2 +- roles/build_packer_templates/README.md | 3 ++- .../templates/linux.pkr.hcl.j2 | 12 ++++++------ 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 432b56d..fadf939 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # packer-kvm -Create VM templates with Packer for usage with Libvirt/KVM virtualization : CentOS 9 (Stream), CentOS 10 (Stream), AlmaLinux 9, Focal (Ubuntu 2004), Fedora 40, Jammy (Ubuntu 2204), Noble (Ubuntu 2404), Debian 12 (Bookworm). +Create VM templates with Packer for usage with Libvirt/KVM virtualization : CentOS 9 (Stream), CentOS 10 (Stream), AlmaLinux 9, Rocky 9, Focal (Ubuntu 2004), Fedora 40, Jammy (Ubuntu 2204), Noble (Ubuntu 2404), Debian 12 (Bookworm). Only for education and learning purposes. Do not use it in production. @@ -117,6 +117,7 @@ pip3 install docker-compose Each JSON file is a template for a distribution : * [almalinux9.pkr.hcl](https://github.com/goffinet/packer-kvm/blob/master/almalinux9.pkr.hcl) +* [rocky9.pkr.hcl](https://github.com/goffinet/packer-kvm/blob/master/rocky9.pkr.hcl) * [centos9.pkr.hcl](https://github.com/goffinet/packer-kvm/blob/master/centos9.pkr.hcl) * [centos10.pkr.hcl](https://github.com/goffinet/packer-kvm/blob/master/centos10.pkr.hcl) * [fedora40.pkr.hcl](https://github.com/goffinet/packer-kvm/blob/master/fedora40.pkr.hcl) @@ -172,6 +173,7 @@ You can have more details from Packet with the env var configured : `PACKER_LOG= I build images for qemu/KVM with this project and I [publish them](http://download.goffinet.org/kvm/index.html) for use in those other IaC projects: [Virt-scripts](https://github.com/goffinet/virt-scripts) and **[Terraform with Libvirt/KVM provider](https://github.com/goffinet/terraform-libvirt)**. - [almalinux9.qcow2](http://download.goffinet.org/kvm/almalinux9.qcow2) [[md5sum]](http://download.goffinet.org/kvm/almalinux9.qcow2.md5sum) [[sha256sum]](http://download.goffinet.org/kvm/almalinux9.qcow2.sha256sum) +- [rocky9.qcow2](http://download.goffinet.org/kvm/rocky9.qcow2) [[md5sum]](http://download.goffinet.org/kvm/rocky9.qcow2.md5sum) [[sha256sum]](http://download.goffinet.org/kvm/rocky9.qcow2.sha256sum) - [centos9.qcow2](http://download.goffinet.org/kvm/centos9.qcow2) [[md5sum]](http://download.goffinet.org/kvm/centos9.qcow2.md5sum) [[sha256sum]](http://download.goffinet.org/kvm/centos9.qcow2.sha256sum) - [centos10.qcow2](http://download.goffinet.org/kvm/centos10.qcow2) [[md5sum]](http://download.goffinet.org/kvm/centos10.qcow2.md5sum) [[sha256sum]](http://download.goffinet.org/kvm/centos10.qcow2.sha256sum) - [fedora40.qcow2](http://download.goffinet.org/kvm/fedora40.qcow2) [[md5sum]](http://download.goffinet.org/kvm/fedora40.qcow2.md5sum) [[sha256sum]](http://download.goffinet.org/kvm/fedora40.qcow2.sha256sum) diff --git a/imagename b/imagename index e3d5b23..2725a3d 100644 --- a/imagename +++ b/imagename @@ -1 +1 @@ -almalinux9 centos9 centos10 debian12 fedora40 ubuntu2004 ubuntu2204 ubuntu2404 \ No newline at end of file +almalinux9 centos9 centos10 debian12 fedora40 rocky9 ubuntu2004 ubuntu2204 ubuntu2404 \ No newline at end of file diff --git a/roles/build_packer_templates/README.md b/roles/build_packer_templates/README.md index f5eecec..fe89d71 100644 --- a/roles/build_packer_templates/README.md +++ b/roles/build_packer_templates/README.md @@ -62,7 +62,8 @@ To use this role, include it in your Ansible playbook and provide the necessary This role supports the following operating system versions for building Packer templates: - **Red Hat-based Systems:** - - AlmaLinux: 9.4 + - AlmaLinux: 9 + - Rocky: 9 - CentOS Stream: 9, 10 - Fedora: 40 diff --git a/roles/build_packer_templates/templates/linux.pkr.hcl.j2 b/roles/build_packer_templates/templates/linux.pkr.hcl.j2 index 52cfeb7..d24a973 100644 --- a/roles/build_packer_templates/templates/linux.pkr.hcl.j2 +++ b/roles/build_packer_templates/templates/linux.pkr.hcl.j2 @@ -22,17 +22,17 @@ variable "config_file" { variable "cpu" { type = string - default = "{{ item.cpu |default(vm.cpu) }}" + default = "{{ item.cpu | default(vm.cpu) }}" } variable "destination_server" { type = string - default = "{{ item.destination_server |default(destination_server) }}" + default = "{{ item.destination_server | default(destination_server) }}" } variable "disk_size" { type = string - default = "{{ item.disk_size |default(vm.disk_size) }}" + default = "{{ item.disk_size | default(vm.disk_size) }}" } variable "headless" { @@ -57,17 +57,17 @@ variable "name" { variable "ram" { type = string - default = "{{ item.ram |default(vm.ram) }}" + default = "{{ item.ram | default(vm.ram) }}" } variable "ssh_password" { type = string - default = "{{ item.ssh_password |default(ssh_password) }}" + default = "{{ item.ssh_password | default(ssh_password) }}" } variable "ssh_username" { type = string - default = "{{ item.ssh_username |default(ssh_username) }}" + default = "{{ item.ssh_username | default(ssh_username) }}" } variable "version" {