Commit Graph

5 Commits

Author SHA1 Message Date
Don Kuntz b0589c9643 Append underlying error to output when FixerAmazonPrivateIP cannot parse the value of ssh_private_ip 2019-02-25 14:20:14 -06:00
Don Kuntz e4faa98b6f cleanup: remove continue statement after a return statement, because it's unreachable 2019-02-22 10:38:27 -06:00
Don Kuntz e251adb37e Make the amazon-private-ip fixer errors more visible
At present, when using the packer fix command on a template that has
"ssh_private_ip" set to anything but a boolean value, the fixer will
fail, and appear to fail silently, simply returning a non-zero status
code without any message.

To determine what happened, users have to know to set PACKER_LOG=1 to
make the log message visible.

So far as I can tell, this is the only instance of log.Fatalf being
called, and based on the surrounding code the better solution would be
to return an error, which will then be visible to users of packer fix
without having to look in the logs.
2019-02-22 10:26:55 -06:00
Brendan Devenney 73c532e772 Ensure amazon-private-ip fixes string values
The "ssh_private_ip" key works with either boolean values or string
representations of booleans. The fixer errors when the value is defined
as, for example, "true" (with quotation marks). This commit will attempt
to convert the string into a bool when necessary to ensure this case is
handled.

Signed-off-by: Brendan Devenney <brendan.devenney@cloudreach.com>
2018-07-05 16:57:54 +01:00
Matthew Hooker 19a89a101e
builder/amazon: remove ssh_private_ip
ssh_private_ip should now be set through ssh_interface.

Adds fixer to automatically fix existing json files
2018-02-08 16:47:43 -08:00