Eugenio Marzo
94a94648dd
change requested after a PR review
2017-07-22 07:58:38 +02:00
Eugenio Marzo
3a5331cbb2
replaced not with ! in the if
2017-07-12 15:32:39 +02:00
Eugenio Marzo
dd3d782659
Added exception if chef.node_path is defined on Vagrantfile but the directory does not exist locally
2017-07-12 15:27:10 +02:00
Seth Vargo
49ce775b53
Prefix tempfiles with vagrant-
2016-05-31 00:18:16 -04:00
Seth Vargo
7014aa3bab
Remove custom tempfile class
...
This is not actually providing any additional utility and also causes
namespace conflicts with people trying to use the real Tempfile class.
2016-05-30 23:21:47 -04:00
Seth Vargo
f95eb124d5
Use Util::Tempfile in Chef provisioner
...
This also fixes some Windowsisms
2016-05-28 23:22:35 -04:00
Seth Vargo
5a4f345363
Use Util::Tempfile when configuring networks
...
This fixes a fairly large tempfile leak. Vagrant uses a template
renderer to write network configuration files locally to disk. Then,
that temporarily file is uploaded to the remote host and moved into
place. Since Vagrant is such a short-lived process, GC never came along
and cleaned up those tempfiles, resulting in many temporary files being
created through regular Vagrant usage.
The Util::Tempfile class uses a block to ensure the temporary file is
deleted when the block finishes. This API required small tweaks to the
usage, but provides more safety to ensure the files are deleted.
2016-05-28 23:22:34 -04:00
Seth Vargo
b384ff98a5
Trailing comma
2016-05-19 11:35:53 -04:00
Thom May
693d4dd5f1
Support Chef Solo local + legacy modes
...
Signed-off-by: Thom May <thom@may.lt>
2016-05-19 15:27:17 +01:00
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
ec85548bd6
Support arrays for data_bags_path
...
Fixes GH-5988
2015-11-19 16:17:42 -08:00
Seth Vargo
1fd9aec493
Only append folder suffixes if we are sharing host folder paths
...
Fixes GH-6472
2015-11-19 16:08:32 -08:00
Seth Vargo
a90e6cfe4c
Use the new Chef installation channel and options
...
This deprecates "prerelease", which will be removed in the next release.
2015-11-19 14:57:01 -08: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
Brian Dwyer
fd593a85b7
Add `nodes_path` support for the Chef-Solo provisioner
2015-09-27 23:23:28 -04:00
Brian Dwyer
e4cdb473bd
Bring back `nodes_path` support for the Chef Zero provisioner
2015-07-28 12:41:51 -04:00
Seth Vargo
4b1847acf3
Use Chef Client for Chef Zero
...
Fixes GH-5619
2015-07-09 21:23:42 -06:00
Seth Vargo
e9bcf147f0
Prefix with guest_
2015-07-09 17:01:36 -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
Mitchell Hashimoto
300b9c9109
provisioners/chef: don't check existing set, unique ID
...
[GH-5199]
2015-07-09 14:04:12 -06:00
Mitchell Hashimoto
e64cef9d31
provisioners/chef: fix crash if run list is somehow nil [GH-5545]
2015-07-05 17:30:29 -07:00
Seth Vargo
b92d4b21a1
Add UI::Interface#color?
2015-06-01 11:49:09 -04:00
Taliesin Sisson
9233e22974
Use powershell syntax for Chef provisioner when using windows
2015-05-02 16:21:32 +01:00
Mitchell Hashimoto
713be4c5b9
provisioners/chef: actually use command -v
2015-02-24 10:12:25 -08:00
Mitchell Hashimoto
c1e2d36090
provisioners/chef: use command -v to check for binary [GH-5167]
2015-02-24 10:11:05 -08:00
Michael Lopez
8adc10f295
Update chef_zero provisioner to use real chef-zero/local-mode to support cookbook version constraint
2015-02-14 22:32:16 +01:00
Michael Lopez
74ffcb27d6
Add 'enable_reporting' attribute for chef provisioner
2015-02-14 22:28:32 +01:00
Mitchell Hashimoto
661657c63f
provisioners/chef: fix failing test
2015-01-06 10:57:25 -08:00
Mitchell Hashimoto
5b4b387f04
provisioners/chef: fix failing tests
2015-01-06 10:56:28 -08:00
Mitchell Hashimoto
155516fb6c
provisioners/chef: use synced folder cache instead of counter
2015-01-06 10:31:13 -08:00
Seth Vargo
97d5a6ebfc
Log chef-zero instead of chef-solo
2014-12-28 12:52:54 -05:00
Torben Knerr
f2b494c2cc
don't forget to pass the `installer_download_path` from the config!
2014-12-17 00:48:34 +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
59eb0ad2e8
Add Chef Apply provisioner
2014-10-30 15:32:15 -04: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
Teemu Matilainen
dec5dcdda3
provisioners/chef: Add `chef_zero` provisioner
...
Add Chef Zero provisioner using `local_mode` configuration for
chef-solo/chef-client.
2014-10-30 13:43:24 -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
cf71634813
DRY'd up Chef command building
...
There's very little difference between the command building on Linux and Windows other than path formatting. All Chef provisioners support the --no-color argument now.
Added unit tests to verify changes.
2014-04-26 21:07:26 -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