Skip to content

Instantly share code, notes, and snippets.

@mixassio
Created March 15, 2019 07:31
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 mixassio/8aee798ac755d66ad777e4978cdc38da to your computer and use it in GitHub Desktop.
Save mixassio/8aee798ac755d66ad777e4978cdc38da to your computer and use it in GitHub Desktop.
packer example with ansible
{
"variables": {
"project_id": null,
"source_image_family": null,
"machine_type": "f1-micro"
},
"builders": [
{
"type": "googlecompute",
"project_id": "{{ user `project_id` }}",
"image_name": "name-image-{{timestamp}}",
"image_family": "name-image",
"source_image_family": "{{ user `source_image_family` }}",
"zone": "europe-west4-c",
"ssh_username": "username",
"machine_type": "{{ user `machine_type` }}"
}
],
"provisioners": [
{
"type": "ansible",
"playbook_file": "playbooks/packer_python.yml"
},
{
"type": "ansible",
"playbook_file": "playbooks/packer_postgres.yml"
},
{
"type": "ansible",
"playbook_file": "playbooks/packer_node.yml"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment