Example files to create snapshots in Hetzner
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
831 B

  1. {
  2. "variables": {
  3. "hcloud_token": "my_hetzner_token"
  4. },
  5. "builders": [
  6. {
  7. "type": "hcloud",
  8. "token": "{{user `hcloud_token`}}",
  9. "image": "ubuntu-18.04",
  10. "location": "nbg1",
  11. "server_type": "cx11",
  12. "ssh_keys": [
  13. "szangiev",
  14. "vlad"
  15. ],
  16. "snapshot_name": "nginx-php",
  17. "snapshot_labels": {
  18. "test": "label",
  19. "shell": "bash",
  20. "python": "3"
  21. },
  22. "user_data_file": "ubuntu_deps.sh",
  23. "communicator": "ssh",
  24. "ssh_username": "root",
  25. "pause_before_connecting": "1m"
  26. }
  27. ],
  28. "provisioners": [
  29. {
  30. "type": "shell",
  31. "script": "ubuntu_deps.sh"
  32. },
  33. {
  34. "type": "shell",
  35. "inline": [
  36. "sudo apt-get install -y php-mysql php-pgsql mysql-server postgresql-10"
  37. ]
  38. }
  39. ]
  40. }