|
1 | 1 | { |
2 | | - "builders": [{ |
3 | | - "type": "amazon-ebs", |
4 | | - "region": "{{ user `aws_region` }}", |
5 | | - "source_ami": "{{user `source_ami`}}", |
6 | | - "instance_type": "{{user `builder_instance_type`}}", |
7 | | - "ssh_username": "{{user `ssh_username`}}", |
8 | | - "ami_name": "{{user `ami_name`}}", |
9 | | - "source_ami_filter": { |
10 | | - "filters": { |
11 | | - "architecture": "x86_64", |
12 | | - "name": "{{user `ami_filter_name`}}", |
13 | | - "root-device-type": "ebs", |
14 | | - "virtualization-type": "hvm" |
| 2 | + "builders": [ |
| 3 | + { |
| 4 | + "type": "amazon-ebs", |
| 5 | + "region": "{{ user `aws_region` }}", |
| 6 | + "source_ami": "{{user `source_ami`}}", |
| 7 | + "instance_type": "{{user `builder_instance_type`}}", |
| 8 | + "ssh_username": "{{user `ssh_username`}}", |
| 9 | + "ami_name": "{{user `ami_name`}}", |
| 10 | + "source_ami_filter": { |
| 11 | + "filters": { |
| 12 | + "architecture": "x86_64", |
| 13 | + "name": "{{user `ami_filter_name`}}", |
| 14 | + "root-device-type": "ebs", |
| 15 | + "virtualization-type": "hvm" |
| 16 | + }, |
| 17 | + "most_recent": true, |
| 18 | + "owners": "{{user `ami_filter_owners`}}" |
15 | 19 | }, |
16 | | - "most_recent": true, |
17 | | - "owners": "{{user `ami_filter_owners`}}" |
18 | | - }, |
19 | | - "vpc_id": "{{ user `vpc_id` }}", |
20 | | - "subnet_id": "{{ user `subnet_id` }}" |
21 | | - }], |
| 20 | + "vpc_id": "{{ user `vpc_id` }}", |
| 21 | + "subnet_id": "{{ user `subnet_id` }}" |
| 22 | + } |
| 23 | + ], |
22 | 24 |
|
23 | | -"provisioners": [ |
24 | | - { |
25 | | - "type": "shell", |
26 | | - "inline": [ |
27 | | - "set -e", |
28 | | - "sudo apt update -y || (echo 'APT Update Failed'; exit 1)", |
29 | | - "sudo apt install -y bash systemd rsync rsyslog jq zstd conntrack systemd-timesyncd || (echo 'APT Install Failed'; exit 1)" |
30 | | - ] |
31 | | - }, |
32 | | - { |
33 | | - "type": "shell", |
34 | | - "inline": [ |
35 | | - "curl -fsSL -o /tmp/palette-agent-install.sh https://github.com/spectrocloud/agent-mode/releases/latest/download/palette-agent-install.sh", |
36 | | - "chmod +x /tmp/palette-agent-install.sh", |
37 | | - "sudo /tmp/palette-agent-install.sh" |
38 | | - ] |
39 | | - } |
40 | | -] |
| 25 | + "provisioners": [ |
| 26 | + { |
| 27 | + "type": "shell", |
| 28 | + "inline": [ |
| 29 | + "set -e", |
| 30 | + "sudo apt update -y || (echo 'APT Update Failed'; exit 1)", |
| 31 | + "sudo apt install -y bash systemd rsync rsyslog jq zstd conntrack systemd-timesyncd || (echo 'APT Install Failed'; exit 1)" |
| 32 | + ] |
| 33 | + }, |
| 34 | + { |
| 35 | + "type": "file", |
| 36 | + "source": "files", |
| 37 | + "destination": "/tmp" |
| 38 | + }, |
| 39 | + { |
| 40 | + "type": "shell", |
| 41 | + "inline": [ |
| 42 | + "curl -fsSL -o /tmp/palette-agent-install.sh https://github.com/spectrocloud/agent-mode/releases/latest/download/palette-agent-install.sh", |
| 43 | + "chmod +x /tmp/palette-agent-install.sh", |
| 44 | + "sudo -E USERDATA=/tmp/files/user-data /tmp/palette-agent-install.sh" |
| 45 | + ] |
| 46 | + } |
| 47 | + ] |
41 | 48 | } |
0 commit comments