diff --git a/templates/packer/ansible/inventory/rhel-8-aarch64/group_vars/all.yml b/templates/packer/ansible/inventory/rhel-9-aarch64/group_vars/all.yml similarity index 100% rename from templates/packer/ansible/inventory/rhel-8-aarch64/group_vars/all.yml rename to templates/packer/ansible/inventory/rhel-9-aarch64/group_vars/all.yml diff --git a/templates/packer/ansible/inventory/rhel-8-x86_64/group_vars/all.yml b/templates/packer/ansible/inventory/rhel-9-x86_64/group_vars/all.yml similarity index 100% rename from templates/packer/ansible/inventory/rhel-8-x86_64/group_vars/all.yml rename to templates/packer/ansible/inventory/rhel-9-x86_64/group_vars/all.yml diff --git a/templates/packer/ansible/roles/common/tasks/packages.yml b/templates/packer/ansible/roles/common/tasks/packages.yml index 57a0157d0..510f18244 100644 --- a/templates/packer/ansible/roles/common/tasks/packages.yml +++ b/templates/packer/ansible/roles/common/tasks/packages.yml @@ -27,7 +27,7 @@ # We need EPEL for monit - name: Add EPEL dnf: - name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm + name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm state: present disable_gpg_check: yes when: ansible_distribution == 'RedHat' diff --git a/templates/packer/worker.pkr.hcl b/templates/packer/worker.pkr.hcl index 67a938aa0..1b4b319eb 100644 --- a/templates/packer/worker.pkr.hcl +++ b/templates/packer/worker.pkr.hcl @@ -26,10 +26,10 @@ source "amazon-ebs" "image_builder" { build { source "amazon-ebs.image_builder" { - name = "rhel-8-x86_64" + name = "rhel-9-x86_64" - # Use a static RHEL 8.6 Cloud Access Image. - source_ami = "ami-03debf3ebf61b20cd" + # Use a static RHEL 9.0 Cloud Access Image. + source_ami = "ami-0f7c7d22de9e097ea" ssh_username = "ec2-user" instance_type = "c6a.large" aws_polling { @@ -38,7 +38,7 @@ build { } # Set a name for the resulting AMI. - ami_name = "${var.image_name}-rhel-8-x86_64" + ami_name = "${var.image_name}-rhel-9-x86_64" # Apply tags to the resulting AMI/EBS snapshot. tags = { @@ -46,7 +46,7 @@ build { Name = "${var.image_name}" composer_commit = "${var.composer_commit}" os = "rhel" - os_version = "8" + os_version = "9" arch = "x86_64" } @@ -60,10 +60,10 @@ build { } source "amazon-ebs.image_builder" { - name = "rhel-8-aarch64" + name = "rhel-9-aarch64" - # Use a static RHEL 8.6 Cloud Access Image. - source_ami = "ami-0c84d76d81209a0e2" + # Use a static RHEL 9.0 Cloud Access Image. + source_ami = "ami-019ece25c0f135889" ssh_username = "ec2-user" instance_type = "c6g.large" aws_polling { @@ -72,7 +72,7 @@ build { } # Set a name for the resulting AMI. - ami_name = "${var.image_name}-rhel-8-aarch64" + ami_name = "${var.image_name}-rhel-9-aarch64" # Apply tags to the resulting AMI/EBS snapshot. tags = { @@ -80,7 +80,7 @@ build { Name = "${var.image_name}" composer_commit = "${var.composer_commit}" os = "rhel" - os_version = "8" + os_version = "9" arch = "aarch64" } diff --git a/tools/appsre-ansible/rpmbuild.yml b/tools/appsre-ansible/rpmbuild.yml index eb9139a3b..b97b6b4bf 100644 --- a/tools/appsre-ansible/rpmbuild.yml +++ b/tools/appsre-ansible/rpmbuild.yml @@ -16,8 +16,8 @@ - name: Add EPEL dnf: - name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm state: present + name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm disable_gpg_check: yes - name: Subscribe @@ -81,7 +81,7 @@ - name: Mockbuild osbuild shell: >- mock - -r "rhel-8-{{ ansible_architecture }}" + -r "rhel-9-{{ ansible_architecture }}" --rebuild --define "commit {{ OSBUILD_COMMIT }}" --define "_rpmfilename %%{NAME}.rpm" @@ -100,7 +100,7 @@ - name: Mockbuild osbuild-composer shell: >- mock - -r "rhel-8-{{ ansible_architecture }}" + -r "rhel-9-{{ ansible_architecture }}" --rebuild --define "commit {{ COMPOSER_COMMIT }}" --define "_rpmfilename %%{NAME}.rpm" diff --git a/tools/appsre-build-worker-packer.sh b/tools/appsre-build-worker-packer.sh index c0d6bcc3c..408713b23 100755 --- a/tools/appsre-build-worker-packer.sh +++ b/tools/appsre-build-worker-packer.sh @@ -60,10 +60,10 @@ fi if [ "$ON_JENKINS" = true ]; then # jenkins on main: build rhel only - PACKER_ONLY_EXCEPT=--only=amazon-ebs.rhel-8-x86_64,amazon-ebs.rhel-8-aarch64 + PACKER_ONLY_EXCEPT=--only=amazon-ebs.rhel-9-x86_64,amazon-ebs.rhel-9-aarch64 elif [ -n "$CI_COMMIT_BRANCH" ] && [ "$CI_COMMIT_BRANCH" == "main" ]; then # Schutzbot on main: build all except rhel - PACKER_ONLY_EXCEPT=--except=amazon-ebs.rhel-8-x86_64,amazon-ebs.rhel-8-aarch64 + PACKER_ONLY_EXCEPT=--except=amazon-ebs.rhel-9-x86_64,amazon-ebs.rhel-9-aarch64 elif [ -n "$CI_COMMIT_BRANCH" ]; then # Schutzbot but not main, build everything (use dummy except) PACKER_ONLY_EXCEPT=--except=amazon-ebs.dummy @@ -84,8 +84,8 @@ function write_inventories { # write rpmrepo_distribution variable local rpmrepo_distribution="$distro" - if [[ $rpmrepo_distribution == rhel-8 ]]; then - rpmrepo_distribution=rhel-8-cdn + if [[ $rpmrepo_distribution == rhel-9 ]]; then + rpmrepo_distribution=rhel-9-cdn fi cat >"$item/group_vars/all.yml" <