Created
July 2, 2017 08:12
-
-
Save katopz/b07b2afd7c06b79f8ee67ca59161b04e to your computer and use it in GitHub Desktop.
Packer example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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