Commit Graph

17 Commits

Author SHA1 Message Date
Paul Hinze a7cbbbd258 communicator/ssh: bastion host support
* adds `bastion_*` fields to `connection` which add configuration for a
   bastion host
 * if `bastion_host` is set, connect to that host first, then jump
   through it to make the SSH connection to `host`
 * enables SSH Agent forwarding by default
2015-06-22 18:00:18 -05:00
Paul Hinze 44de0996c5 communicator/ssh: switch agent default to true
This changes SSH Agent utilization from opt-in to opt-out, bringing
Terraform in line with the behavior of Packer and the `ssh` command
itself.

But skip SSH agent connections if the SSH_AUTH_SOCK env var doesn't exist,
whcih means there's no agent to connect to.
2015-06-19 17:14:43 -05:00
Sander van Harmelen f146a31ded Fixing #2033 by adding a small check on the input
If the input begins with a shebang, we’ll leave it as is. If not we’ll
add a default shebang…
2015-05-21 23:36:54 +02:00
Sander van Harmelen a8dacede24 Improved some logging...
I added a debug log line in the last commit, only to find out it’s now
logging the same info twice. So removed the double entry and tweaked
the existing once.
2015-05-11 15:18:32 +02:00
Sander van Harmelen d4150d5b1a Adding the tests... 2015-05-08 18:17:57 +02:00
Sander van Harmelen 3881c81a66 Added the exit code as well... 2015-05-05 21:56:20 +02:00
Sander van Harmelen 48f4d499f9 Fixing a small vet warning introduced by PR #1796
While fixing the vet warning also tried to improve any feedback by
showing the actual output/error instead of just the error code.

While testing this I noticed only adding stderr output is not enough as
not all error info is send to stderr, but sometimes also to stdout.
2015-05-05 21:26:28 +02:00
Luke Amdor fbae7884eb remote-exec (ssh): chmod'ing right path 2015-05-04 15:44:44 -05:00
Luke Amdor 11b4060fee remote-exec (ssh): checking chmod command 2015-05-04 15:44:39 -05:00
Sander van Harmelen e55169b39b Typo... 2015-05-01 22:28:12 +02:00
Sander van Harmelen 7f408cf8aa Adding an import needed for the tests
This will likely be a temp fix until `make updated eps` is made a
little smarter by @phinze 😉
2015-05-01 22:26:11 +02:00
Sander van Harmelen a1a1ea5cf9 Removing stray comments/commands 2015-05-01 18:52:01 +02:00
Sander van Harmelen b6660a1abe Updated test as the winrmtest package was tweaked a little...
The winrmtest package update is merged now, so this can be merged now
as well…
2015-05-01 18:52:01 +02:00
Sander van Harmelen 2689601bc3 And here are the tests...
Pretty nice test coverage this way, covering all WinRM actions/logic by
using the winrmtest package. I had to extend/update/fix that package a
little here and there, but it now serves a nice purpose for testing
WinRM stuff…
2015-05-01 18:52:01 +02:00
Sander van Harmelen 41748003c0 Updated the PR according to the review comments
* We now return an error when you set the script_path to
C:\Windows\Temp explaining this is currently not supported
* The fix in PR #1588 is converted to the updated setup in this PR
including the unit tests

Last thing to do is add a few tests for the WinRM communicator…
2015-05-01 18:52:01 +02:00
Sander van Harmelen 4a29c714e5 Adding support for WinRM 2015-05-01 18:48:54 +02:00
Sander van Harmelen c9e9e374bb Adding some abstractions for the communicators
This is needed as preperation for adding WinRM support. There is still
one error in the tests which needs another look, but other than that it
seems like were now ready to start working on the WinRM part…
2015-05-01 18:48:54 +02:00