diff --git a/templates/packer/ansible/inventory/fedora-38-aarch64/group_vars/all.yml b/templates/packer/ansible/inventory/fedora-40-aarch64/group_vars/all.yml similarity index 100% rename from templates/packer/ansible/inventory/fedora-38-aarch64/group_vars/all.yml rename to templates/packer/ansible/inventory/fedora-40-aarch64/group_vars/all.yml diff --git a/templates/packer/ansible/inventory/fedora-38-x86_64/group_vars/all.yml b/templates/packer/ansible/inventory/fedora-40-x86_64/group_vars/all.yml similarity index 100% rename from templates/packer/ansible/inventory/fedora-38-x86_64/group_vars/all.yml rename to templates/packer/ansible/inventory/fedora-40-x86_64/group_vars/all.yml diff --git a/templates/packer/worker.pkr.hcl b/templates/packer/worker.pkr.hcl index 53b3208508..1d2a4ce623 100644 --- a/templates/packer/worker.pkr.hcl +++ b/templates/packer/worker.pkr.hcl @@ -93,23 +93,23 @@ build { } source "amazon-ebs.image_builder" { - name = "fedora-38-x86_64" + name = "fedora-40-x86_64" - # Use a static Fedora 38 Cloud Base Image. - source_ami = "ami-01752495da7056fa9" + # Fedora-Cloud-Base-AmazonEC2.x86_64-40-1.14-hvm-us-east-1-gp3-0 + source_ami = "ami-004f552bba0e5f64f" ssh_username = "fedora" instance_type = "c6a.large" # Set a name for the resulting AMI. - ami_name = "${var.image_name}-fedora-38-x86_64" + ami_name = "${var.image_name}-fedora-40-x86_64" # Apply tags to the resulting AMI/EBS snapshot. tags = { AppCode = "IMGB-001" - Name = "${var.image_name}-fedora-38-x86_64" + Name = "${var.image_name}-fedora-40-x86_64" composer_commit = "${var.composer_commit}" os = "fedora" - os_version = "38" + os_version = "40" arch = "x86_64" } @@ -117,7 +117,7 @@ build { launch_block_device_mappings { delete_on_termination = "true" device_name = "/dev/sda1" - volume_size = 5 + volume_size = 6 volume_type = "gp3" } @@ -130,24 +130,23 @@ EOF } source "amazon-ebs.image_builder" { - name = "fedora-38-aarch64" + name = "fedora-40-aarch64" - # Use a static Fedora 38 Cloud Base Image. - # Fedora-Cloud-Base-38-1.5 - source_ami = "ami-046ab62d59c5a451c" + # Fedora-Cloud-Base-AmazonEC2.aarch64-40-1.14-hvm-us-east-1-gp3-0 + source_ami = "ami-0d3825b70fa928886" ssh_username = "fedora" instance_type = "c6g.large" # Set a name for the resulting AMI. - ami_name = "${var.image_name}-fedora-38-aarch64" + ami_name = "${var.image_name}-fedora-40-aarch64" # Apply tags to the resulting AMI/EBS snapshot. tags = { AppCode = "IMGB-001" - Name = "${var.image_name}-fedora-38-aarch64" + Name = "${var.image_name}-fedora-40-aarch64" composer_commit = "${var.composer_commit}" os = "fedora" - os_version = "38" + os_version = "40" arch = "aarch64" } @@ -155,7 +154,7 @@ EOF launch_block_device_mappings { delete_on_termination = "true" device_name = "/dev/sda1" - volume_size = 5 + volume_size = 6 volume_type = "gp3" } @@ -167,6 +166,14 @@ update-crypto-policies --set LEGACY EOF } + # Ansible is a little broken on fedora>39, needs python-six + provisioner "shell" { + only = ["amazon-ebs.fedora-40-x86_64", "amazon-ebs.fedora-40-aarch64"] + inline = [ + "sudo dnf install -y python3.9" + ] + } + provisioner "ansible" { playbook_file = "${path.root}/ansible/playbook.yml" user = build.User diff --git a/tools/appsre-build-fedora-worker-packer.sh b/tools/appsre-build-fedora-worker-packer.sh index 85d91af2a3..5321fb0224 100755 --- a/tools/appsre-build-fedora-worker-packer.sh +++ b/tools/appsre-build-fedora-worker-packer.sh @@ -8,7 +8,7 @@ export BUILD_RPMS=false # Fedora community workers use osbuild form rpmrepo + composer from # copr, as the osbuild rpms from copr disappear too quickly. export ANSIBLE_TAGS="fedora" -FEDORA=fedora-38 +FEDORA=fedora-40 export PACKER_ONLY_EXCEPT=--only=amazon-ebs."$FEDORA"-x86_64,amazon-ebs."$FEDORA"-aarch64 COMMIT_SHA="${COMMIT_SHA:-$(git rev-parse HEAD)}" diff --git a/tools/appsre-build-worker-packer.sh b/tools/appsre-build-worker-packer.sh index 936937952b..2bd736501d 100755 --- a/tools/appsre-build-worker-packer.sh +++ b/tools/appsre-build-worker-packer.sh @@ -70,6 +70,12 @@ EOF if [[ $osbuild_commit != "null" ]]; then tee -a "$item/group_vars/all.yml" <