We could add a new flag to the build command, say -connection-info
which prints out connection details, passwords, and private keys, etc in the same way as debug does but without the confirmation of each step and disabling of parallelism. -debug
would implicitly enable this.
The code changes would be very easy.
Closes #3885
+1
+1. This would compliment -on-error=abort/ask nicely, since without the ephemeral ssh key used for remote builds, you're stuck trying to debug without other workarounds.
:+1:
Going to start working on this now..
Hi, are there any updates on this feature? Sorry if I sound impatient, but I'm really looking forward to it.. :)
Got a bit derailed, but I'm on it again. Hopefully I can publish a initial version that can be tested on some builders tomorrow.
@justinmetz I dumped a initial WIP version which works with the amazon-ebs
builder, if you want to test it out and give me feedback it would be awesome. If you want support for another builder I can hopefully fix that really quickly.
I saw that "WIP: Basic support for -connection-info flag #6863" has been closed. So is the -connection-info
flag feature merged yet?
Not yet in Packer v1.5.5
, right?
I closed it because it had been an open WIP PR for a year with no further work. It's not merged, but much of the connection info can now be printed using the build template engine.
I think there's still a need to be able to show the connection details (eg. password) prior to getting to the point of being able to use the build template engine.
Let's consider the scenario when we need to debug winrm communicator failures in the amazon-ebs
builder. We need access to the password in order to be able to connect to the machine, but as I understand the password is only output using the -debug
flag.
The -debug
flag cannot be used in an automated build / ci system as it will pause before it attempts to run the user_data_file
.
I thought PACKER_LOG=1
would display the password, but it doesn't.
Most helpful comment
Going to start working on this now..