Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created June 25, 2020 09:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save velotiotech/d9e05253d8537b49e6a0c25750584c69 to your computer and use it in GitHub Desktop.
Save velotiotech/d9e05253d8537b49e6a0c25750584c69 to your computer and use it in GitHub Desktop.
{
"builders": [
{
"ami_description": "{{user `ami-description`}}",
"ami_name": "{{user `ami-name`}}",
"ami_regions": [
"us-east-1"
],
"ami_users": [
"XXXXXXXXXX"
],
"ena_support": "true",
"instance_type": "t2.medium",
"region": "us-east-1",
"source_ami_filter": {
"filters": {
"name": "amzn2-ami-hvm-2.0*x86_64*",
"root-device-type": "ebs",
"virtualization-type": "hvm"
},
"most_recent": true,
"owners": [
"amazon"
]
},
"sriov_support": "true",
"ssh_username": "ec2-user",
"tags": {
"Name": "{{user `ami-name`}}"
},
"type": "amazon-ebs"
}
],
"post-processors": [
{
"inline": [
"echo AMI Name {{user `ami-name`}}",
"date",
"exit 0"
],
"type": "shell-local"
}
],
"provisioners": [
{
"script": "install_amazon.bash",
"type": "shell"
}
],
"variables": {
"ami-description": "Amazon Linux for Jenkins Master and Slave ({{isotime \"2006-01-02-15-04-05\"}})",
"ami-name": "amazon-linux-for-jenkins-{{isotime \"2006-01-02-15-04-05\"}}",
"aws_access_key": "",
"aws_secret_key": ""
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment