Skip to content

Instantly share code, notes, and snippets.

@katopz
Created July 2, 2017 08:12
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 katopz/b07b2afd7c06b79f8ee67ca59161b04e to your computer and use it in GitHub Desktop.
Save katopz/b07b2afd7c06b79f8ee67ca59161b04e to your computer and use it in GitHub Desktop.
Packer example
{
"variables": {
"api_token": "{{env `DO_TOKEN`}}"
},
"builders": [
{
"api_token": "{{user `api_token`}}",
"type": "digitalocean",
"region": "sgp1",
"image": "ubuntu-16-04-x64",
"size": "512mb",
"snapshot_name": "ubuntuz-{{timestamp}}",
"ssh_username": "root",
"private_networking": true,
"monitoring": true
}
],
"provisioners": [
{
"type": "shell",
"scripts": [
"./ubuntu/setup-swapfile.sh",
"./ubuntu/secure-auto-update.sh",
"./ubuntu/secure-ip-spoofing.sh",
"./ubuntu/secure-shared-memory.sh",
"./ubuntu/secure-sysctl.sh",
"./ubuntu/secure-fail2ban.sh",
"./ubuntu/secure-ufw.sh",
"./cleanup/cleanup-ubuntu.sh"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment