I'm trying to automate the build process for templates and have run into an issue when trying to use a keypair.
{
"builders": [{
"type": "cloudstack",
"api_url": "{{user `api_url`}}",
"api_key": "{{user `api_key`}}",
"network": "{{user `network`}}",
"secret_key": "{{user `secret_key`}}",
"service_offering": "{{user `service_offering`}}",
"source_template": "{{user `source_template`}}",
"template_os": "{{user `template_os`}}",
"zone": "{{user `zone`}}",
"instance_name": "{{ user `instance_name`}}-{{timestamp}}",
"template_name": "{{user `template_name`}}-{{timestamp}}",
"template_password_enabled": true,
"template_scalable": true,
"expunge": true,
"ssh_username": "{{user `ssh_username`}}",
"ssh_private_key_file": "/root/to/cloudstack.pem",
"keypair": "{{user `keypair`}}"
}],
The variables are set in another file.
==> cloudstack: Waiting for SSH to become available...
Build 'cloudstack' errored: unexpected EOF
==> Some builds didn't complete successfully and had errors:
--> cloudstack: unexpected EOF
I've also tried without the ssh_private_key_file setting but it hangs on waiting for SSH to become available and eventually times out.
Assuming I'm doing something stupid, is anyone able to point me in the right direction?
many thanks.