-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathansible-ami.json
42 lines (42 loc) · 991 Bytes
/
ansible-ami.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{
"description": "This is a test ami with ansible",
"variables": {
"Name": "fdebuire ansible ami",
"AwsAccount": "{{env `AWS_ACCOUNT`}}"
},
"builders": [
{
"region": "eu-west-2",
"type": "amazon-ebs",
"source_ami": "ami-0eb89db7593b5d434",
"ami_description": "This is a test ami with ansible",
"ami_users": [
"{{user `AwsAccount`}}"
],
"run_tags": {
"Name": "{{user `Name`}}"
},
"run_volume_tags": {
"Name": "{{user `Name`}}"
},
"tags": {
"Name": "{{user `Name`}}"
},
"temporary_key_pair_name": "fdebuire_packer",
"instance_type": "t2.micro",
"ssh_username": "ubuntu",
"ami_name": "fdebuire-ansible-{{timestamp}}"
}
],
"provisioners": [
{
"type": "file",
"source": "/tmp/.ssh/ansible.pem",
"destination": "~/.ssh/id_rsa"
},
{
"type": "shell",
"script": "scripts/install_ansible.sh"
}
]
}