Seth Vargo
8319f159b6
Use hostname if no node_name is set
...
Fixes GH-7063
2016-03-17 20:15:11 -05:00
Seth Vargo
8c3f833e8e
Use the new presence helpers in the Chef provisioner
2015-11-23 18:33:47 -05:00
Seth Vargo
609ff9f7b2
Allow provisioner cleanup task to exit on failure
2015-11-19 14:55:46 -08:00
Seth Vargo
9559fc549c
Automatically generate a node_name for Chef
...
This is required because the Chef Server almost always needs a node name to
interact. This will default to the hostname, but that's always going to be
`vagrant.vm`, which will collide easily.
This generates a random hostname with `vagrant-` as the prefix and stores the
result in the machine's data directory.
2015-11-19 11:38:33 -08:00
Seth Vargo
f999218c53
Perform Chef delete operations on the guest instead of the host
2015-11-18 18:28:42 -08:00
Seth Vargo
a1a3824e35
Do not throw an error when the Chef node_name is nil
2015-11-18 16:56:31 -08:00
Seth Vargo
4b1847acf3
Use Chef Client for Chef Zero
...
Fixes GH-5619
2015-07-09 21:23:42 -06:00
Seth Vargo
0e039159a6
Calculate Chef paths at provision time
2015-07-09 16:55:55 -06:00
Seth Vargo
742d47c4cf
No longer need subprocess wrapping there :)
2015-07-09 16:06:03 -06:00
Taliesin Sisson
9233e22974
Use powershell syntax for Chef provisioner when using windows
2015-05-02 16:21:32 +01:00
Seth Vargo
f86189a2fe
Add Env.with_clean_env for resetting the Ruby and Rubygems environment
2014-11-10 12:00:23 -05:00
Seth Vargo
f232dc38c9
Automatically install Chef when provisioning with Chef
2014-11-07 15:56:22 -05:00
Seth Vargo
1169c80a72
Use require_relative for faster loading
...
require_relative is an order of magnitude faster on Windows
2014-10-30 13:43:25 -04:00
Mitchell Hashimoto
2cdcc29902
provisioners/chef: put global lock around knife exec
2014-08-06 10:24:05 -07:00
Shawn Neal
2fd634273f
First attempt at trying to fix issue 2476
...
This addresses the error "chef is not part of the bundle" when the chef-client provisioner attempts to delete the node or client from the Chef Server. While this fixes the specific issue on my system, its likely that it does not account for all system configurations like RVM.
The Bundler.with_clean_env should probably be moved internally to Subprocess.execute, but that's a riskier change and I'd like to get some feedback before even attempting that size of change.
2014-06-24 16:49:17 -07:00
Kalman Hazins
bb052366f7
Change symbols inside hashes to 1.9 JSON-like syntax
2014-05-22 12:35:12 -04:00
Shawn Neal
068b5cf0b9
Move Windows symlink re-establishment after reboot into capability
...
This reduces the complexity and likelihood of provisioner bugs.
2014-04-30 17:36:36 -07:00
Shawn Neal
38c7203f92
Chef provisioner should utilize reboot capability
2014-04-26 21:07:26 -07:00
Shawn Neal
99ce95198b
First pass at integrating new WinRM elevated execution wrapper
...
- Removed a lot of the Windows special casing from Chef runs
- Don't attempt to use @config.binary_env since we don't properly pass this along to Chef
2014-04-26 21:07:26 -07:00
Mitchell Hashimoto
1c7faae1ee
provisioners/*: prefix the output
2014-04-21 13:56:19 -07:00
Mitchell Hashimoto
7022b1c29d
provisioners/chef: command builder for Linux
2014-04-21 13:54:06 -07:00
Mitchell Hashimoto
909cda4bd1
provisioners/chef: reinit net shares on Windows guests
2014-04-21 13:54:05 -07:00
Teemu Matilainen
7d90191212
provisioners/chef: DRY up `environment` and `node_name` configuration
2014-02-21 23:28:46 -03:00
Teemu Matilainen
ad34d474bc
provisioners/chef: DRY and unify encrypted data bag secret handling
...
Pull up encrypted data bag secret management into the base classes, thus
also unifying the functionality.
Especially this complements the issues:
* Upload the secret to provisioning path also with chef-solo [GH-1246]
* Delete the secret also with chef-client [GH-2712]
* Remove the secret before uploading also with chef-client [GH-1111]
2014-02-15 22:46:48 -03:00
Teemu Matilainen
d321b9199e
provisioners/chef: fix node/client deletion when node_name is not set [GH-2345]
...
V2 config uses `hostname` instead of `host_name`.
2013-12-13 00:51:22 -03:00
Mitchell Hashimoto
8581a93e76
provisioners/chef: upload encrypted data bag secret to prov path
...
[GH-1246]
2013-11-25 15:55:00 -08:00
Mitchell Hashimoto
2be01284ea
provisioners/chef: fix exception during node cleanup [GH-2345]
2013-10-14 17:12:49 -10:00
Mitchell Hashimoto
9fcc89bcf1
provisioners/chef: use real variable in delete from chef sever [GH-2300]
2013-10-01 14:13:16 -07:00
Mitchell Hashimoto
a8ebd30cb9
provisioners/chef: use Subprocess to execute knife
2013-08-29 11:26:21 -07:00
Mitchell Hashimoto
d4c7e20110
core: ProvisionerCleanup task to run cleanup on provisioners
2013-08-29 11:13:43 -07:00
Mitchell Hashimoto
93c98aad01
Merge branch 'pr/1267'
...
Conflicts:
plugins/provisioners/chef/provisioner/chef_client.rb
2013-08-29 10:50:50 -07:00
Mitchell Hashimoto
8379d0e20e
Don't forcibly output newlines for provisioners
2013-07-19 23:38:25 -04:00
Patrick Connolly
7e0050527d
Moves to using new chef cache/backup dir defaults.
...
Conflicts:
plugins/provisioners/chef/provisioner/base.rb
2013-07-16 16:50:10 -07:00
Mitchell Hashimoto
c0539d6e31
Warn if run list on Chef is empty, not error [GH-1620]
2013-04-19 10:12:09 -06:00
Mitchell Hashimoto
129f1985bd
Remove the "!" on chef client provision method.
2013-01-13 16:51:16 -08:00
Mitchell Hashimoto
0c8391aedd
Chef uses the new provisioner API
2013-01-13 16:41:32 -08:00
Nate Smith
691cca7911
Suppress knife output
2012-12-17 12:04:53 -05:00
Nate Smith
94ce12683e
Show node name in logging
2012-12-17 11:58:15 -05:00
Nate Smith
370d6b0c98
Delete Chef client and node on cleanup
...
This fixes #1253 by shelling out to `knife` on cleanup, as per
@mitchellh's suggestion in #1255
2012-12-17 11:49:27 -05:00
Mitchell Hashimoto
44804ce94b
Fix old channel usage on chef client provisioner
2012-10-26 16:39:51 -07:00
jtimberman
50e9f83970
Add config.arguments for Chef
...
* Adds chef.arguments to Chef::Provisioner::Config
* Usable in both chef-client and chef-solo
* Specify as a string, "-L /tmp/foo.log", e.g.
2012-08-10 12:58:43 -06:00
Mitchell Hashimoto
9956e6d012
Better directory structure for plugins
2012-04-20 16:53:01 -07:00