Commit Graph

73 Commits

Author SHA1 Message Date
Sander van Harmelen 986245c553 provisioner/chef: fixes #4262
This small tweak fixes #4262 by making sure files can be uploaded
correctly.
2016-01-09 15:56:49 +01:00
Sander van Harmelen 71ffb6caa0 Add the option to add arbitrary `client.rb` options
Fixes #3630
2016-01-09 00:42:02 +01:00
Petr Artamonov 76913703a9 modified to have less code and not to verify incoming string 2016-01-08 20:00:11 +01:00
Petr Artamonov 64f19c0dc3 enable reporting flag 2016-01-07 18:13:30 +01:00
Sander van Harmelen b007d4f77a Revert changing `path.Join()` to `filepath.Join()` (PR #3896)
PR #3896 added support for passing keys by content, but in this same PR
all references to `path.Join()` where changed to `filepath.join()`.
There is however a significant difference between these two calls and
using the latter one now causes issues when running the Chef
provisioner on Windows (see issue #4039).
2015-11-24 14:40:46 +01:00
Paul Hinze 73ce6d184a chef: read key contents instead of paths
Builds on the work of #3846, shifting the Chef provisioner's
configuration options from `secret_key_path` and `validation_key_path`
over to `secret_key` and `validation_key`.
2015-11-12 16:11:44 -06:00
Joel Moss b1d731bd6f [chef provisioning] When use_policyfile is given, the run list is not used, so don't require it 2015-10-14 19:05:38 +01:00
Radek Simko f9efede852 gofmt files from recently merged PRs 2015-10-07 13:35:06 -07:00
Joel Moss 20362e7506 Added Policyfile support to the Chef provisioner
This Adds three new arguments `use_policyfile`, `policy_group` and `policy_name` to the Chef
provisioner. If `use_policyfile` == true, then the other arguments are required.
2015-09-26 00:56:24 +01:00
Sander van Harmelen 162568e682 Fixes issue #2872
Still not a 100% fix, but that would require some more hacking in core
TF. If time permits I’ll have a look at that later on… But for now this
is a good fix to be able to close #2872
2015-08-21 17:26:32 +02:00
Sander van Harmelen 885b4e9278 Updating the test accordingly... 2015-07-20 18:34:44 +02:00
Sander van Harmelen df909ca3ca Fix an issue with `sudo` and `hints`
Fixes issue #2781
2015-07-20 18:31:32 +02:00
Sander van Harmelen 4a8ef78d33 Fixes #2676 by prefixing all Windows commands
By prefixing them with `cmd /c` it will work with both `winner` and
`ssh` connection types.

This PR also reverts some bad stringer changes made in PR #2673
2015-07-10 12:56:27 +02:00
Sander van Harmelen 97fd4f5b7d Tweaking the tests 2015-07-09 21:29:27 +02:00
Joshua Seidel cda814d8b3 No need to do this as they both are in their own scope 2015-07-09 09:32:13 -04:00
Joshua Seidel 4070805fcd ran gofmt removed required, added IF 2015-07-09 09:05:12 -04:00
Joshua Seidel 61f47d440d correct space, fix reading of file 2015-07-08 20:06:37 -04:00
Joshua Seidel 090248fab1 fix errors 2015-07-08 19:41:38 -04:00
Joshua Seidel cd58da773c remove unused if 2015-07-08 15:25:00 -04:00
Joshua Seidel 7f4a5ac413 fix if statement and condition 2015-07-08 15:09:17 -04:00
Joshua Seidel 6e21ca50a0 add chef secret key 2015-07-08 14:52:23 -04:00
Jeroen de Korte 1c14bfd04d Added the HTTPS proxy option 2015-07-03 16:27:52 +02:00
Jeroen de Korte 007ab6e503 Fixed the http_proxy 2015-07-03 15:04:58 +02:00
Sander van Harmelen 3d03f4b2aa Fixing the tests 2015-06-30 14:13:36 +02:00
Sander van Harmelen b7e981c6d1 Fixes issue #2568
When surrounding the version with quotes, even no version (an empty
string) will be accepted as parameter. The install.sh script treats an
empty version string the same as no when version is set. So it will
then just use the latest available version.
2015-06-30 14:03:06 +02:00
Sander van Harmelen 61517f68b1 Add an `ohai_hints` option to upload hint files
This option takes a list of hints that will be uploaded to the new node
before starting the initial Chef run.
2015-06-25 16:32:36 +02:00
Sander van Harmelen 2690d87d39 Add an option to specifically specify the target OS
Before this option (`os_type`) the provisioner would use the connection
type to determine the targeted OS. When not supplying a value for
`os_type`, it will fall back to the old behaviour, so this is full BC.
2015-06-25 14:29:48 +02:00
Sander van Harmelen 4f6e610ff9 Improve the decoding logic to prevent parameter not found errors
We need to decode both the Raw config and the parsed Config to make
sure all set keys are visible. Otherwise keys that will need to be
interpolated later, will be missing causing the validation to fail.
2015-06-03 14:45:30 +02:00
Sander van Harmelen be56a3a02e Fix interpolation in the Chef provisioner
Turns out to be a pretty obvious bug with a simple fix…
2015-06-01 15:29:43 +02:00
Sam Boyer b82bd0c280 Condense switch fallthroughs into expr lists 2015-05-26 21:52:36 -04:00
Sander van Harmelen 11314a3d71 Tweaking a few minor things according to the feedback on GH 2015-05-12 10:37:38 +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 2a5fffc24d Small textual update... 2015-05-08 23:27:12 +02:00
Sander van Harmelen c19d92fb67 Refactored quite a few things after review...
Also renamed the provisioner to just `chef` as it’s out intention to
end up with one provisioner for all types of `chef` clients.
2015-05-08 23:25:24 +02:00
Sander van Harmelen d4150d5b1a Adding the tests... 2015-05-08 18:17:57 +02:00
Sander van Harmelen 4a99cf9e9f Small update/fix to properly clean ANSI going to the logfile... 2015-05-08 14:54:56 +02:00
Sander van Harmelen 60984b2da2 This commit adds a Chef Client provisioner
The commit is pretty complete and has a tested/working provisioner for
both SSH and WinRM. There are a few tests, but we maybe need another
few to have better coverage. Docs are also included…
2015-05-08 14:54:56 +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 b1c6a3f63f Few small fixes to make the last tests also pass
The reason why the shebang is removed from these tests, is because the
shebang is only needed for SSH/Linux connections. So in the new setup
the shebang line is added in the SSH communicator instead of in the
resource provisioner itself…
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
Mitchell Hashimoto de8666a5fa helper/ssh: add random number to script [GH-1545] 2015-04-18 16:09:08 -07:00
Paul Hinze 3f66e480cc provisioner/file: expand ~ in source
closes #1559

tested manually, since a unit test would be sort of annoying to write.
:)
2015-04-16 18:53:04 -05:00
Tarrant 05407296c6 Add cleanup function to close SSHAgent 2015-03-20 18:18:35 -07:00
Tarrant 164f303da4 Add SSH Agent support 2015-03-15 16:12:59 -07:00
Mitchell Hashimoto 539eca5ee6 Fix failing tests 2014-10-09 21:29:21 -07:00
Mitchell Hashimoto a154520ce8 provisioners/remote-exec: output 2014-10-05 23:23:30 -07:00
Mitchell Hashimoto 0808236c6e provisioners/local-exec: output the output 2014-10-05 23:05:49 -07:00
Mitchell Hashimoto e5868ebdd9 provisioners/*: new interface 2014-10-04 16:29:33 -07:00
Mitchell Hashimoto c452579512 provisioners/*: compiling, tests passing 2014-09-16 17:08:27 -07:00