Skip to content

Instantly share code, notes, and snippets.

@s-chb
Created April 26, 2020 18:43
Show Gist options
  • Save s-chb/e2343f04490f995775d3985a00bc48bd to your computer and use it in GitHub Desktop.
Save s-chb/e2343f04490f995775d3985a00bc48bd to your computer and use it in GitHub Desktop.
{
"variables": {
"os_username": "{{env `OS_USERNAME`}}",
"os_password": "{{env `OS_PASSWORD`}}",
"os_auth_url": "{{env `OS_AUTH_URL`}}",
"os_region_name": "{{env `OS_REGION_NAME`}}",
"os_tenant_name": "{{env `OS_TENANT_NAME`}}",
"ssh_username": "{{env `SSH_USERNAME`}}",
"os_domaine_name": "{{env `OS_USER_DOMAIN_NAME`}}"
},
"builders": [
{
"type": "openstack",
"identity_endpoint": "{{user `os_auth_url`}}",
"tenant_name": "{{user `os_tenant_name`}}",
"domain_name": "{{user `os_domaine_name`}}",
"username": "{{user `os_username`}}",
"password": "{{user `os_password`}}",
"ssh_username": "{{user `ssh_username`}}",
"region": "{{user `os_region_name`}}",
"image_name": "packer-image",
"instance_name": "packer-instance",
"availability_zone": "eu-west-0a",
"use_blockstorage_volume": false,
"source_image": "the ID of the public image",
"flavor": "c2.xlarge",
"networks": ["the ID of the network"],
"floating_ip": "the ID of the elastic IP"
}
],
"provisioners": [
{
"script": "setup-vm.sh",
"type": "shell"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment