93 Commits

Author SHA1 Message Date
Brian Cain
06b3268b6f
Fixes #8315: Properly set env variables for puppet provisioner
Prior to this commit, the puppet provisioner would not properly set its
environment variables, if any were configured in the Vagrantfile. This
commit separates those properly with semicolons when calling out to
puppet apply.
2018-09-18 10:09:01 -07:00
Brian Cain
7fe03988aa
Merge branch 'puppet_structured_facts_toyaml_on_provisioner' of git://github.com/aloyr/vagrant into aloyr-puppet_structured_facts_toyaml_on_provisioner 2018-04-09 11:01:36 -07:00
Ben Hines
e133547932 Properly call winssh communicator on windows via powershell, and fix syntax for powershell via puppet. 2017-09-29 20:53:09 -07:00
Brian Cain
4ed93fb9ef (#8743) Fix puppet provisioner by removing manifestdir flag
Prior to this commit, the puppet provisioner would use the manifest dir
flag when running `puppet apply`. Not only is this flag redundant due to
how puppet apply works, but it is also deprecated in Puppet 4 and
removed in Puppet 5. This commit simply removes the flag when invoking
`puppet apply`.
2017-07-19 09:59:59 -07:00
Chris Roberts
9b12d4db48 Pass configuration environment variables to apply command 2016-10-26 09:51:56 -07:00
Peter Carrero
d5c13dda64 puppet: Add "to_yaml" to facter call
The rationale here is to make it so existing Vagrantfile
configurations remain unchanged.

While benh57's solution worked for me, I had to add a
".to_yaml" to the VagrantFile line that implemented puppet.facter
and this would mean existing Vagrant configurations that use Puppet
would produce an error if that was not present.

Additionally, without this change, the Vagrant file also needed a
"require('yaml')" declaration to make the ".to_yaml" conversion
possible.
2016-04-13 16:11:25 -05:00
gavioto20
d2e8086181 Fixed an issue locating puppet binary. Issue-6876 2016-01-21 20:14:43 +01:00
Shawn Neal
e1a0b01e27 Fix issue 6762
Fixes error "The term '$?' is not recognized as the name of a cmdlet, function, script"
2016-01-06 13:37:28 -08:00
Mitchell Hashimoto
f5f596ab8b Merge pull request #6389 from grafjo/fix_6151
Fix for #6151 / provisioner puppet_server with Puppet Collection 1
2015-11-18 14:59:58 -08:00
Seth Vargo
72d62e3d2e Merge pull request #6404 from timotei/patch-1
Remove back tick in puppet facts definitions #6403 (Fix vagrant 1.7.3+ with puppet)
2015-11-18 14:02:48 -08:00
Mitchell Hashimoto
c200190c5b Merge pull request #6259 from philipwigg/5943-fix-puppet-verify-binary
Fix verify_binary for Puppet for Windows guests.
2015-11-18 13:15:34 -08:00
Timotei Dolean
13be9731ab Remove back tick in puppet facts definitions #6403
Starting with vagrant 1.7.3 
(commit 1152b4e1df97fb5f468491954932d4f0c09875b1) we don't
save the command to be executed in the file anymore, but we send
it as a parameter, thus the back tick makes things worse.
2015-10-16 16:20:15 +03:00
Johannes Graf
9998544995 Fix for #6151 / provisioner puppet_server with Puppet Collection 1
puppet_server provisioner fails with Puppet Collection 1 with the
following error:

```bash
==> default: Running provisioner: puppet_server...
The `puppet` binary appears not to be in the PATH of the guest. This
could be because the PATH is not properly setup or perhaps Puppet is not
installed on this guest. Puppet provisioning can not continue without
Puppet properly installed.
```
2015-10-10 21:16:12 +02:00
Philip Wigg
33b4d6a63d Fix verify_binary for Puppet for Windows guests. 2015-09-11 20:06:21 +01:00
Mattias Appelgren
f349a58a1e provisioners/puppet: Fix Puppet environment default manifest
Also parse the puppet variables $codedir and $environment when
resolving a manifest path from environment.conf
2015-07-18 14:48:03 +02:00
Ben Hines
97a9cd35fc Upload facts to temp dir before sudoing them to final location. 2015-07-15 17:13:47 -07:00
Ben Hines
bfb66f3166 Correct default path to facter and indentaion 2015-07-15 16:52:00 -07:00
Mitchell Hashimoto
3476491881 update CHANGELOG 2015-07-15 10:57:38 -07:00
Ben Hines
770d927ba1 Structured yaml facts - first pass 2015-07-15 00:38:57 -07:00
Ben Hines
46eedb6491 Back to using 'which' when no path is defined since the winrm communicator overrides it anyway. 2015-07-14 23:55:09 -07:00
Ben Hines
8c2ddac2cd Check for nil config_path. 2015-07-14 23:26:55 -07:00
Ben Hines
8c1ff5ee26 Fix custom puppet.binary_path to work properly on windows.
Fix automatic puppet path detection on windows
2015-07-14 23:21:46 -07:00
Mitchell Hashimoto
fec6ef11c8 provisioners/puppet: just quiet the NFS errors for Puppet [GH-5456] 2015-07-06 11:19:32 -06:00
Seth Vargo
b92d4b21a1 Add UI::Interface#color? 2015-06-01 11:49:09 -04:00
John Cooper
7f716f4b63 Added synced_folder_args to puppet provisioner 2015-05-30 21:26:05 -07:00
Ben Hines
9bbfbef977 Be a bit more robust when parsing environment.conf 2015-04-27 23:09:07 -07:00
Ben Hines
602227ca7d Remove debug spam from development. 2015-04-16 00:50:53 -07:00
Ben Hines
ffcb58bcd9 When using environments, allow specifying the 'main manifest' using manifest_path and manifest_file. 2015-04-12 12:31:31 -07:00
Ben Hines
0efb9a3932 Fix resolution of puppet path for <4.0 2015-04-12 12:29:50 -07:00
Ben Hines
b40426aca5 Properly parse out and use the environment's manifest file which is specified in environment.con. 2015-04-12 02:16:54 -07:00
Ben Hines
c8f300e5f5 Correct environment path option to puppet apply. 2015-04-12 01:43:19 -07:00
Ben Hines
c701bab253 Properly handle various combinations of Puppet options being specified. 2015-04-12 01:26:41 -07:00
Ben Hines
7a4e7929f8 Don't parse env metadata until provisioning time. TBD: make it functional 2015-04-12 01:18:49 -07:00
Ben Hines
3ee47acb42 Remove debug output 2015-04-12 01:18:12 -07:00
Ben Hines
e2c68fc12d Correct environment path config name. 2015-04-11 23:48:18 -07:00
Ben Hines
3a2a9a3b94 Add a binary_path option to the puppet provisioner to match the chef provisioner, and support new puppet 4 install location. 2015-04-11 23:35:25 -07:00
Ben Hines
cf847e0410 Merge branch 'master' into environments_wip
Conflicts:
	Vagrantfile
	vagrant.gemspec
2015-04-11 13:33:32 -07:00
Mitchell Hashimoto
95e1c19f22 provisioners/puppet: fix exception with module paths [GH-5123] 2015-01-06 22:50:24 -08:00
Mitchell Hashimoto
de6b55d007 provisioners/puppet: use predictable synced folders 2015-01-06 10:48:31 -08:00
Mitchell Hashimoto
37a04b4bfc provisioners/puppet: use correct error class [GH-4520] 2014-10-23 10:46:11 -07:00
Ben Hines
16870d72d1 Some work in progress environment support 2014-10-19 21:28:38 -07:00
Mitchell Hashimoto
b516881d47 provisioners/puppet: don't repeat output when prov fails [GH-4303] 2014-08-06 11:11:12 -07:00
Brett Porter
0c7c143ad1 fix escaping of powershell variable
As this is nested in a powershell variable $command, it must be escaped
otherwise it is evaluated when the variable is created, giving an error that
"The term 'True' is not recognized as the name of a cmdlet, function,
script". This prevented using a puppet.working_directory on Windows.
2014-06-18 16:05:17 +10:00
Ben Hines
7d52f0e14d Backtick-escape the facter env command in powershell. Fixes issue 3958 2014-06-02 19:37:29 -07:00
Emiliano Ticci
6bd7359c1b provisioners/puppet: run in elevated mode on Win guests 2014-05-26 11:23:14 +02:00
Kalman Hazins
bb052366f7 Change symbols inside hashes to 1.9 JSON-like syntax 2014-05-22 12:35:12 -04:00
Paul Cooper @ Agile Barbecue
573683ef00 fix windows guest with puppet and a facter block
Powershell doesn't understand the unix-style ENV=thing command syntax, the old vagrant-windows plugin monkey patched the provisioner to put semicolons between statements to set the variables before running puppet - this fixes the issue inside a windows? block leaving the normal non-windows code path working - therefore works for me on both unix and windows provisions with a facter block in place
2014-05-13 17:31:31 +01:00
Mitchell Hashimoto
39eaaf3664 provisioners/puppet: windows module sep [GH-3731] 2014-05-09 09:22:36 -07: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
Mitchell Hashimoto
1c7faae1ee provisioners/*: prefix the output 2014-04-21 13:56:19 -07:00