diff --git a/roles/aws/aws_ami/defaults/main.yml b/roles/aws/aws_ami/defaults/main.yml index 9a0d64566..0316a1b2a 100644 --- a/roles/aws/aws_ami/defaults/main.yml +++ b/roles/aws/aws_ami/defaults/main.yml @@ -10,6 +10,10 @@ aws_ami: owner: "136693071363" # Global AWS account ID of owner, defaults to Debian official ssh_username: "admin" encrypt_boot: false + # EBS volume options + device_name: /dev/xvda # default for Debian AMIs + volume_type: gp3 + volume_size: 20 #vpc_filter: "example" # If defined, Packer will search for a VPC with the `Name` tag of the value given. vpc_id takes precednece over this if both are defined. This also assumes the VPC is not the default and has a CIDR block of /16. vpc_filter: "" #subnet_filter_az: "a" # If vpc_id and/or vpc_filter are defined, subnet_filter_az MUST be defined and must match an AZ that has public networking. diff --git a/roles/aws/aws_ami/templates/packer.json.j2 b/roles/aws/aws_ami/templates/packer.json.j2 index 24dcf20ab..84e01c1dd 100755 --- a/roles/aws/aws_ami/templates/packer.json.j2 +++ b/roles/aws/aws_ami/templates/packer.json.j2 @@ -14,6 +14,14 @@ "ami_name": "{{ aws_ami.ami_name }}", "associate_public_ip_address": true, "encrypt_boot": "{{ aws_ami.encrypt_boot }}", + "launch_block_device_mappings": [ + { + "device_name": "{{ aws_ami.device_name }}", + "volume_type": "{{ aws_ami.volume_type }}", + "volume_size": {{ aws_ami.volume_size }}, + "delete_on_termination": true + } + ] "source_ami_filter": { "filters": { "virtualization-type": "{{ aws_ami.virtualization_type }}", diff --git a/roles/debian/mount_sync/README.md b/roles/debian/mount_sync/README.md index 50d1475ca..56a828ddc 100644 --- a/roles/debian/mount_sync/README.md +++ b/roles/debian/mount_sync/README.md @@ -5,8 +5,9 @@ It will: - perform an initial rsync using a cloud-init script - use Unison to perform regular checks (mostly to catch edge-cases where an instance would be spinned up during the middle of a deployment) - - + + + ## Default variables