Commit Graph

187 Commits

Author SHA1 Message Date
Chris Roberts 7df6ea5a30 Fix Chef apply provisioner to not set node_name
The base chef provisioner class will set the node name automatically
if not provided in the configuration. Since the chef apply provisioner
does not provide a node_name option, setting it will invalidate the
configuration. This checks for the node name before attempting to
use it.

Fixes #9901
2018-06-11 10:35:52 -07:00
Chris Roberts 8b398b66a3 Trim drive letter prefix from path
Fixes #9764
2018-05-03 09:28:19 -07:00
Brian Cain b409f0e203
Merge pull request #9669 from dduponchel/data_bags_path
Support arrays for data_bags_path in chef-zero
2018-04-24 15:45:36 -07:00
Brian Cain 9f29812db8
Merge pull request #9690 from briancain/expand_nodes_path_chef
File path expand all chef_zero config path options
2018-04-18 13:04:38 -07:00
Julian Zinn 269645f63d Improve Windows drive letter removal hack 2018-04-17 13:23:14 -07:00
Brian Cain e8ab85e92b
(#9383) File path expand all chef_zero config path options
This commit ensures that all paths are properly file path expanded for
each config option in chef_zero.
2018-04-16 11:05:39 -07:00
David Duponchel d08a472610 Support arrays for data_bags_path in chef-zero
The pull request #6561 added the support for arrays for data_bags_path
in chef-solo and chef-zero, but missed a `.first` in chef-zero (which
only keeps the first data bag path). The documentation and the template
for chef-zero are already good (since #6561).

Fixes #9668.
2018-04-09 17:46:42 +02:00
Taliesin Sisson 3ab64ab7e4 Handle Chef provisioner requests to reboot. A request to reboot is not a convergence failure, so don't treat it like a convergence failure.
Wait for the machine to reboot before trying to continue the provisioning.
2017-08-10 11:39:41 +01:00
Brian Cain 623b117208 Merge pull request #8682 from Telekom-PD/omnibus-url
Add config option omnibus_url for chef provisioners
2017-08-03 09:19:13 -07:00
Artem Sidorenko 875c2edc62 Add config option omnibus_url for chef provisioners
This option is useful for internal setups, where own customized
omnibus installation script is used (e.g. to get chef from a mirror)
2017-08-03 10:06:27 +02:00
Eugenio Marzo 7e436c6971 fixed warnings about missing folders for Chef Solo and Zero 2017-08-01 21:37:11 +02:00
Eugenio Marzo c9b65bd129 produce error when node_path is defined but the directory does not exist on disk locally 2017-07-22 11:05:34 +02:00
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
Anand Suresh 30f4eb62ea Add chef_install(ed?) guest capability for freebsd 2017-04-04 22:10:02 -07:00
Chris Roberts dbbd2d8e36 Remove deprecated methods and update tests. 2016-11-07 18:48:14 -08:00
Seth Vargo e925f3793a
provisioners/chef: Install in one command 2016-06-06 18:22:17 -04: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
Donald Guy 52c95ce291 Correctly detect chefdk install 2016-02-25 19:42:58 -05:00
Seth Vargo 8c68c6ec70 Use "stable" as the default Chef channel
Previously the default channel was "current", but after discussion with
@coderanger on GH-6979, it seems like this was a poor design decision.
Instead, we should use the stable channel and allow users to opt-in to
prerelease versions.

Fixes GH-6979
2016-02-08 10:49:48 -05:00
Seth Vargo 792ee8fb2d Merge pull request #6805 from gimler/double_sudo_fix
remove double sudo
2016-02-03 10:10:35 -05:00
Gordon Franke d384478c06 add chef installer for suse 2016-01-05 15:31:28 +01:00
Gordon Franke 077f9142f7 remove double sudo 2016-01-05 15:23:22 +01:00
Seth Vargo f780c96a90 Convert Chef Version to a string before comparison
Fixes GH-6709
2015-12-22 11:54:41 -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 76f3dce5db Remove deprecated options 2015-11-19 15:52:27 -08:00
Seth Vargo df207d2637 Require nodes_path for Chef Zero provisioning
Fixes GH-6110
2015-11-19 15:52:26 -08:00
Seth Vargo c30467a6f9 Allow Chef to install on Windows 2015-11-19 15:01:09 -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 43ef927628 Latest will have the formatter option 2015-11-19 14:56:18 -08:00
Seth Vargo 2dbd24129f Remove deprecated method 2015-11-19 14:56:03 -08:00
Seth Vargo 609ff9f7b2 Allow provisioner cleanup task to exit on failure 2015-11-19 14:55:46 -08:00
Seth Vargo b8f200a4c1 Only force the formatter if we are on Chef 11 or higher
Fixes GH-6278
2015-11-19 11:48:04 -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 244069d5d7 Merge pull request #6049 from bdwyertech/bdwyertech-patch-2
Chef Zero - Fix 'nodes_path' Support
2015-11-18 16:46:02 -08:00
Mitchell Hashimoto 90b850aa49 Merge pull request #6307 from tbriggs-curse/fix/master/6306_chef_windows_capability
Fix/master/6306 chef windows capability
2015-11-18 13:48:48 -08:00
Brian Dwyer fd593a85b7 Add `nodes_path` support for the Chef-Solo provisioner 2015-09-27 23:23:28 -04:00
Trey Briggs a5b6e23e20 Removed extra quote in powershell command. 2015-09-22 23:28:14 -05:00
Trey Briggs ed1c219a07 version is a Symbol, convert to String before concat. 2015-09-22 23:26:02 -05:00