Skip to content

Commit

Permalink
Add entries for Ubuntu 24.04 Cloud images
Browse files Browse the repository at this point in the history
  • Loading branch information
NamelessOne91 committed Feb 26, 2025
1 parent 462fee2 commit c704926
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 5 deletions.
25 changes: 23 additions & 2 deletions backend_modules/aws/base/ami.tf
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,27 @@ data "aws_ami" "rocky9" {
}
}

data "aws_ami" "ubuntu2004" {
most_recent = true
name_regex = "^ubuntu/images/hvm-ssd/ubuntu-focal-20.04"
owners = ["099720109477"]

filter {
name = "architecture"
values = ["x86_64"]
}

filter {
name = "virtualization-type"
values = ["hvm"]
}

filter {
name = "root-device-type"
values = ["ebs"]
}
}

data "aws_ami" "ubuntu2204" {
most_recent = true
name_regex = "^ubuntu/images/hvm-ssd/ubuntu-jammy-22.04"
Expand All @@ -432,9 +453,9 @@ data "aws_ami" "ubuntu2204" {
}
}

data "aws_ami" "ubuntu2004" {
data "aws_ami" "ubuntu2404" {
most_recent = true
name_regex = "^ubuntu/images/hvm-ssd/ubuntu-focal-20.04"
name_regex = "^ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04"
owners = ["099720109477"]

filter {
Expand Down
3 changes: 2 additions & 1 deletion backend_modules/aws/base/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ locals {
sles12sp5 = { ami = data.aws_ami.sles12sp5.image_id },
sles12sp5-paygo = { ami = data.aws_ami.sles12sp5-paygo.image_id },
rocky8 = { ami = data.aws_ami.rocky8.image_id, ssh_user = "rocky" },
ubuntu2204 = { ami = data.aws_ami.ubuntu2204.image_id, ssh_user = "ubuntu" },
ubuntu2004 = { ami = data.aws_ami.ubuntu2004.image_id, ssh_user = "ubuntu" },
ubuntu2204 = { ami = data.aws_ami.ubuntu2204.image_id, ssh_user = "ubuntu" },
ubuntu2404 = { ami = data.aws_ami.ubuntu2404.image_id, ssh_user = "ubuntu" },
rhel8 = { ami = data.aws_ami.rhel8.image_id},
rhel9 = { ami = data.aws_ami.rhel9.image_id},
}
Expand Down
1 change: 1 addition & 0 deletions backend_modules/azure/base/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ locals {
centos7 = { platform_image = data.azurerm_platform_image.centos7 },
ubuntu2004 = { platform_image = data.azurerm_platform_image.ubuntu2004 },
ubuntu2204 = { platform_image = data.azurerm_platform_image.ubuntu2204 },
ubuntu2404 = { platform_image = data.azurerm_platform_image.ubuntu2404 },
rhel9 = { platform_image = data.azurerm_platform_image.rhel9 },
rhel8 = { platform_image = data.azurerm_platform_image.rhel8 },
rhel7 = { platform_image = data.azurerm_platform_image.rhel7 },
Expand Down
37 changes: 37 additions & 0 deletions backend_modules/azure/host/user_data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -233,3 +233,40 @@ runcmd:

packages: ["salt-minion"]
%{ endif }

%{ if image == "ubuntu2404" }

apt:
sources:
tools_pool_repo:
source: deb http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Master:/Ubuntu2404-Uyuni-Client-Tools/xUbuntu_24.04/ /
key: |
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.5 (GNU/Linux)
mQENBFsnulUBCADNjL4hvhVtSzqVDlMtFFFP28Acq+UNF8WKKMhbBirfOpXwwI1C
NR3i0CXPOce5eKShuuWAjD2E36e2XAp3rUAo/aCA7UgtJkMNKzzlTOcqHHxKTx6H
gvp0Fb6xTKywZ7VttGhwUynl+CsDuOst3ROXTNdb8XMfm4joH2FW5D3ACN2qNiv0
MVcFNKxQ98w8M9xJxdI8DuyngnSeZwAosNzEio3JhTPiTv9ngY2Z3AuYUcwTEt7o
feEN+ivAgYnn+a6DBKFBeCW7VUD3V+tH8/fKnkvI4gf2o3N7Ok+/uE+DPUBb+14f
+9dhBjd+7+pR3ayEZFjQns5XFShoYu2+CQspABEBAAG0UHN5c3RlbXNtYW5hZ2Vt
ZW50OlV5dW5pIE9CUyBQcm9qZWN0IDxzeXN0ZW1zbWFuYWdlbWVudDpVeXVuaUBi
dWlsZC5vcGVuc3VzZS5vcmc+iQE+BBMBCAAoBQJnTV1tAhsDBQkQRFMYBgsJCAcD
AgYVCAIJCgsEFgIDAQIeAQIXgAAKCRCXLl1sDSCDPqobCACZmP4jvLKA8hixwLbB
ws6UpppjKuZ1C29VlfydWW7Zh7YTlQEDweuaP++UTNpG4LFHYEG/h+0m2IiIK8pH
37fzKn+xZB+9SA/4hE3RsJhzwCYXxRnnSzahmagskTQp+vPQS571n8rmXbLQVIV8
VHOjY6CezItu5OAe4m0DVdS9u4LmikPwxV+irdJ1rMphBKzxccGFOmYFXKWWoEk7
VAD02fKgzLdoE6QX9ocIChmDM/fNwEK3us7RWEd2jxqUYdseTsa22clbuR3Dg6SB
E/oQa9zikECUNi4T19DnBpquBzBHlmfnGBtHPkq1KF7mNhdLhD28Atn0gpOGZOnd
VzV9iEYEExECAAYFAlsnulUACgkQOzARt2udZSO/4QCcDf+j/XRbJn2PudsSoyjw
3B2boakAnA9A9b8UoEYgmLTRpwXYuhsxOCDE
=eJaK
-----END PGP PUBLIC KEY BLOCK-----
runcmd:
# WORKAROUND: cloud-init in Ubuntu does not take care of the following
- echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
- systemctl restart sshd

packages: ["salt-minion"]
%{ endif }
2 changes: 1 addition & 1 deletion backend_modules/libvirt/host/network_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ network:
version: 1
config:
- type: physical
%{ if image == "ubuntu2204o" || image == "ubuntu2004o" }
%{ if image == "ubuntu2404o" || image == "ubuntu2204o" || image == "ubuntu2004o" }
name: ens3
%{ else }
name: eth0
Expand Down
2 changes: 1 addition & 1 deletion backend_modules/null/base/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ variable "provider_settings" {

variable "images" {
description = "list of images to be uploaded to the libvirt host, leave default for all"
default = [ "almalinux8o", "almalinux9o", "amazonlinux2o", "centos7o", "libertylinux9o", "opensuse155o", "opensuse156o", "tumbleweedo", "oraclelinux9o", "rocky8o", "rocky9o", "sles12sp5o", "sles15sp2o", "sles15sp3o", "sles15sp4o", "sles15sp5o", "sles15sp6o", "ubuntu2004o", "ubuntu2204o"]
default = [ "almalinux8o", "almalinux9o", "amazonlinux2o", "centos7o", "libertylinux9o", "opensuse155o", "opensuse156o", "tumbleweedo", "oraclelinux9o", "rocky8o", "rocky9o", "sles12sp5o", "sles15sp2o", "sles15sp3o", "sles15sp4o", "sles15sp5o", "sles15sp6o", "ubuntu2004o", "ubuntu2204o", "ubuntu2404o"]
type = set(string)
}

Expand Down
1 change: 1 addition & 0 deletions salt/mirror/etc/mirror-images.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1
http://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img
http://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img
http://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
http://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img

0 comments on commit c704926

Please sign in to comment.