Skip to content

Commit

Permalink
Merge pull request #242 from cisagov/improvement/upgrade-to-debian-bo…
Browse files Browse the repository at this point in the history
…okworm

Update base AMI to Debian Bookworm
  • Loading branch information
mcdonnnj authored Mar 7, 2024
2 parents 0820605 + 41cc1f9 commit c7b9ec8
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 6 deletions.
21 changes: 21 additions & 0 deletions src/install-prerequisites-for-netplan-configuration-fix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
# Install the prerequisites for the user script that fixes the Netplan
# configuration generated by cloud-init from the instance metadata.
#
# See these issues for more details:
# - cisagov/skeleton-packer#300
# - canonical/cloud-init#4764
#
# TODO: Remove this playbook when and if that becomes possible. See
# cisagov/skeleton-packer#301 for more details.
- name: >-
Install prerequisites for the script that fixes the Netplan
configuration generated by cloud-init from the instance metadata
hosts: all
become: true
become_method: ansible.builtin.sudo
tasks:
- name: Install python3-pyyaml
ansible.builtin.package:
name:
- python3-yaml
10 changes: 5 additions & 5 deletions src/packer.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ variable "skip_create_ami" {
type = bool
}

data "amazon-ami" "debian_bullseye" {
data "amazon-ami" "debian_bookworm" {
filters = {
name = "debian-11-amd64-*"
name = "debian-12-amd64-*"
root-device-type = "ebs"
virtualization-type = "hvm"
}
Expand Down Expand Up @@ -93,7 +93,7 @@ source "amazon-ebs" "example" {
region = var.build_region
region_kms_key_ids = var.region_kms_keys
skip_create_ami = var.skip_create_ami
source_ami = data.amazon-ami.debian_bullseye.id
source_ami = data.amazon-ami.debian_bookworm.id
ssh_username = "admin"
subnet_filter {
filters = {
Expand All @@ -102,9 +102,9 @@ source "amazon-ebs" "example" {
}
tags = {
Application = "Example"
Base_AMI_Name = data.amazon-ami.debian_bullseye.name
Base_AMI_Name = data.amazon-ami.debian_bookworm.name
GitHub_Release_URL = var.release_url
OS_Version = "Debian Bullseye"
OS_Version = "Debian Bookworm"
Pre_Release = var.is_prerelease
Release = var.release_tag
Team = "VM Fusion - Development"
Expand Down
7 changes: 7 additions & 0 deletions src/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
- name: Import base image playbook
ansible.builtin.import_playbook: base.yml

# TODO: Remove this when and if that becomes possible. See
# cisagov/skeleton-packer#301.
- name: >-
Import playbook to install prerequisites for the Netplan
configuration fix
ansible.builtin.import_playbook: install-prerequisites-for-netplan-configuration-fix.yml

- name: Import AWS playbook
ansible.builtin.import_playbook: aws.yml

Expand Down
2 changes: 1 addition & 1 deletion src/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.0.0-rc.2"
__version__ = "1.0.0"

0 comments on commit c7b9ec8

Please sign in to comment.