I am trying to get an application server up and running. I changed the
Ubuntu distribution in the template file to point to latest Ubuntu (16.x
instead of 14.x it came with) and now I am getting the below message.
packer build -only=virtualbox-iso application-server.json
Failed to parse template: Error parsing JSON: invalid character '\n' in
string literal
At line 5, column 1 (offset 113):
4: "PACKER_BOX_NAME": "ubuntu-16.04.2-server-i386”,
5:
^
Any idea what this could be ? The message makes it look like its a simple
new line error but unable to see this from my template json file.
On Tuesday, May 6, 2014 at 10:31:35 AM UTC+5:30, Timothy Perrett wrote:
>
> Hey guys,
>
> I upgraded to packer 0.6.0 and now my template fails to load with the
> following error when im trying to debug it locally using var-file argument:
> Error compiling user variables: json: cannot unmarshal object into Go
> value of type string
>
> I think the issue is around the var-file arg, as when i dont specify it
> the template does load. The var-file is typically what we use for local
> debugging, and use it to partially apply the variable set. For example, the
> template has these variables:
>
> "variables": {
> "aws_access_key": "{{env `AWS_ACCESS_KEY`}}",
> "aws_secret_key": "{{env `AWS_SECRET_KEY`}}",
> "packer_region": "{{env `PACKER_REGION`}}",
> "packer_foundation_ami": "{{env `PACKER_FOUNDATION_AMI`}}",
> "username": "{{env `USER`}}"
> }
>
> Whilst the var-file would contain:
>
> {
> "packer_region": "us-west-2",
> "packer_foundation_ami": "ami-xxxx"
> }
>
> As I still want the rest to read from the environment.
>
> What's causing this strange behaviour... is it a bug in 0.6.0?
>
> Thanks!
>
> -- T
>
--
This mailing list is governed under the HashiCorp Community Guidelines -
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of
those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/packer-tool/055b3cb4-1ba6-404b-b4dd-aa91eeceffea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.