Kelley Spoon | c2f86f5 | 2022-11-17 07:28:36 -0600 | [diff] [blame] | 1 | { |
| 2 | "variables": { |
| 3 | "vpc_region": "us-east-1", |
| 4 | "ssh_username": "ubuntu" |
| 5 | }, |
| 6 | "builders": [ |
| 7 | { |
| 8 | "type": "amazon-ebs", |
| 9 | "name": "ubuntu-20.04-custom", |
| 10 | "vpc_id": "vpc-d28c0ca9", |
| 11 | "subnet_id": "subnet-a0d573af", |
| 12 | "region": "{{user `vpc_region`}}", |
| 13 | "source_ami_filter": { |
| 14 | "filters": { |
| 15 | "virtualization-type": "hvm", |
| 16 | "name": "ubuntu/images/*ubuntu-focal-20.04-amd64-server-*", |
| 17 | "root-device-type": "ebs" |
| 18 | }, |
| 19 | "owners": ["099720109477"], |
| 20 | "most_recent": true |
| 21 | }, |
| 22 | "instance_type": "m5a.large", |
| 23 | "ssh_username": "{{user `ssh_username`}}", |
| 24 | "ami_name": "jenkins-custom-amd64-{{isotime \"2006-01-02-1504\"}}", |
| 25 | "ami_regions": ["eu-central-1" ], |
| 26 | "ami_users": [ |
| 27 | "987685672616" |
| 28 | ], |
| 29 | "snapshot_users": [ |
| 30 | "987685672616" |
| 31 | ], |
| 32 | "launch_block_device_mappings": [ |
| 33 | { |
| 34 | "device_name": "/dev/sda1", |
| 35 | "volume_type": "gp2", |
| 36 | "volume_size": "40", |
| 37 | "delete_on_termination": true |
| 38 | } |
| 39 | ] |
| 40 | } |
| 41 | ], |
| 42 | "provisioners": [ |
| 43 | { |
| 44 | "type": "shell", |
| 45 | "inline": [ "sleep 60" ] |
| 46 | }, |
| 47 | { |
| 48 | "type": "shell", |
| 49 | "script": "custom.sh", |
| 50 | "execute_command": "{{.Vars}} sudo -E sh -eux '{{.Path}}'" |
| 51 | } |
| 52 | ] |
| 53 | } |