Created
June 28, 2020 23:51
-
-
Save s-chb/921e63097463e0f58ea58b92962e25b7 to your computer and use it in GitHub Desktop.
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": { | |
"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`}}", | |
"instance_name": "{{env `INSTANCE_NAME`}}", | |
"source_id": "{{env `SOURCE`}}", | |
"os_flavor_id": "{{env `FLAVOR`}}", | |
"os_network_id": "{{env `NETWORK_ID`}}", | |
"os_floating_id": "{{env `FLOATING_ID`}}" | |
}, | |
"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": "{{user `INSTANCE_NAME`}}", | |
"source_image": "{{user `source_id`}}", | |
"availability_zone": "xxx", | |
"use_blockstorage_volume": false, | |
"flavor": "{{user `os_flavor_id`}}", | |
"networks": ["{{user `os_network_id`}}"], | |
"floating_ip": "{{user `os_floating_id`}}" | |
} | |
], | |
"provisioners": [ | |
{ | |
"type": "file", | |
"source": "local-path/file", | |
"destination": "destination-path/file" | |
}, | |
{ | |
"script": "setup.sh", | |
"type": "shell" | |
}, | |
{ | |
"type": "shell", | |
"inline": [ | |
"sudo apt-get update", | |
"sudo apt-get upgrade" | |
] | |
} | |
] | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment