540 Commits

Author SHA1 Message Date
Chris Bednarski
569e6cc464 go fmt 2016-02-08 17:34:06 -08:00
Marat Bakeev
c95b2b483f Merge branch ansible-provisioner of https://github.com/dkhenry/packer 2016-02-05 15:40:17 +13:00
Chris Bednarski
114bddfe36 Merge branch 'master' of https://github.com/mitchellh/packer 2016-02-01 13:28:56 -08:00
Chris Bednarski
1f6749096a Restore missing interpolation after merging ansible remote; fixes #3138 2016-02-01 13:28:49 -08:00
Billie H. Cleek
bf3c294326 listen on system chosen port
Change the default for LocalPort to "0", so that the listener will be a
system chosen port.
2016-01-28 22:22:12 -08:00
Chris Bednarski
15f99a4aee Merge branch 'ansible-provisioner' of https://github.com/bhcleek/packer into f-ansible 2016-01-28 15:16:54 -08:00
Chris Bednarski
87532b1b00 Merge branch 'chef-provisioner-windows' of https://github.com/sneal/packer into f-chef-provisioner-windows 2016-01-28 14:55:17 -08:00
Matt Black
33071150c1 Salt provisioner: option to set logging level on Salt highstate run 2016-01-26 13:09:15 +00:00
Matt Black
9ccf298be9 Salt provisioner: option to ignore salt highstate failures fixes #2486 2016-01-26 13:09:15 +00:00
Matt Black
5cd15b52c5 Salt provisioner: dynamic command line args passed onto salt-call fixes #2652 2016-01-26 13:09:15 +00:00
Matt Black
7cb802f8a0 Salt provisioner: improved inputs validation 2016-01-26 13:09:15 +00:00
Chris Bednarski
3eabc6253d Merge pull request #2653 from evertrue/evertrue/eherot/add_data_bag_secret_to_chef_client
Chef-client provisioner: Add encrypted data bag secret path (Fixes #1945)
2016-01-13 13:59:48 -08:00
Billie Cleek
77c48678d6 eliminate possible race conditions
Eliminate race-y use of the packer.Ui interface by wrapping it in a
concurrency-safe implementation.
2015-12-19 15:15:19 -08:00
Billie Cleek
d73e75a7cf fix panic when connection is closed before packer send Shutdown 2015-12-19 12:15:04 -08:00
David Zanetti
2668747c71 Rename noclean shell option to skip_clean, per pull feedback 2015-11-19 16:02:45 +13:00
David Zanetti
3d23655f2f Add "noclean" boolean to shell provisioner. This stops the provisioner from
attempting to remove helper scripts it creates. As noted on #2803 this can
be useful when deleting the build user from an AMI or other template.
2015-11-16 16:37:09 +13:00
Trevor Suarez
f006a83c95 Fixing the bug found in the tests 2015-11-03 18:19:03 -05:00
Trevor Suarez
6ca02286d4 Test for when the config parameter isn't passed 2015-11-03 18:18:24 -05:00
Trevor Suarez
627a8fe819 Renaming the config parameter from "options"
to "extra_arguments"
2015-11-03 17:55:03 -05:00
Trevor Suarez
4ea7e3473d Testing the new options argument during the actual
call to `Provision()`
2015-11-03 15:01:16 -05:00
Trevor Suarez
84e1b387c4 New test for preparing the new config parameter 2015-11-03 14:36:04 -05:00
Trevor Suarez
ebed9e53fb Adding new "Options" configuration parameter for
the puppet-masterless provisioner, to allow for specifying additional
options to pass to the execute command
2015-11-03 12:30:55 -05:00
Billie Cleek
2dc9e0af3f fix go vet identified issues 2015-10-31 10:39:33 -07:00
Billie H. Cleek
5366393f9f fix tests 2015-10-31 10:39:33 -07:00
Billie H. Cleek
cc8ca3098e add ansible provisioner 2015-10-31 10:39:33 -07:00
Mark Peek
43cb854b3e Merge pull request #2568 from pecigonzalo/f-winrm-reboot
Add reboot checks before moving out of the reboot sequence for WinRM
2015-10-26 16:57:13 -07:00
Mark Peek
c48548b3bb go fmt 2015-10-18 11:13:09 -07:00
Mark Peek
1aad5cf6d5 provisioner/windows-restart: remove race in test 2015-10-12 13:20:18 -07:00
Mark Peek
d87b68efe8 Syncronize cancellation in windows-restart tests
Two windows-restart tests would timeout and fail due to the cancellation
thread firing before the cancel object was created. This change syncronizes
the start of the threads to prevent this from occurring.
2015-10-10 14:32:39 -07:00
Shawn Neal
357e494ee3 Fix failing Windows guest command tests 2015-10-01 10:04:59 -07:00
Shawn Neal
8014dac742 Add Windows support to Chef provisioners
- Add guest os type to change the default Chef-Solo and Chef-Client provisioner behavior. Paths, commands etc.
- Change Chef installation download location to chef.io domain
- Add encrypted data bag secret configuration
2015-10-01 10:04:59 -07:00
Shawn Neal
affebcda86 Windows Powershell commands need to specify shell
The WinRM communicator defaults to the regular Windows cmd shell so we need to tell Packer to use Powershell when running these guest commands.
2015-10-01 10:02:11 -07:00
Shawn Neal
67f6d6cdb5 Adds provisioner guest commands abstraction
Provisioners often needs to perform command line operations on guests that may have different syntax and shells. The GuestCommands type abstracts these away so provisioners can avoid littering branching logic all over the place.
2015-10-01 10:02:10 -07:00
Gonzalo Peci
f01f62dc88 Add specific exit codes listed on https://msdn.microsoft.com/en-us/library/windows/desktop/ms681383(v=vs.85).aspx 2015-08-28 09:55:14 +12:00
Gonzalo Peci
8bd3e62853 Because the new functionality makes the ``waitForRestart()` function run commands it modifies the value of `comm.StartCmd.Command` that is being checked, we need to implement the same workaround that is being used for the `waitForCommunicator()`` function. This should make the test work again and retain functionality. 2015-08-28 09:54:59 +12:00
Gonzalo Peci
08359e409a Revert the shutdown command with new parameters as this will return proper exit codes. This will work in the same way as restart-computer -force when using ``shutdown /r /f /t 0``.
Note:The WinRM library does not return the exit code currently, this will be implemented on https://github.com/masterzen/winrm/pull/26
2015-08-28 09:54:39 +12:00
Gonzalo Peci
70083fc869 Add reboot checks before moving out of the reboot. 2015-08-28 09:54:24 +12:00
Tim Smith
72e8119233 Download chef from chef.io 2015-08-25 21:53:50 -07:00
Eric Herot
f625c985af Chef-client provisioner: Add encrypted data bag secret support (Fixes #1945) 2015-08-21 16:05:47 -07:00
Chris Bednarski
abb67fdd79 Fix govet issues 2015-08-05 19:41:29 -07:00
Chris Bednarski
84abbc2fe2 Merge pull request #2519 from BayanGroup/salt-remote-dirs
Add options to specify salt remote dirs
2015-07-30 19:06:59 -07:00
Chris Bednarski
c04feb77b1 Merge pull request #2520 from BayanGroup/salt-ensure-dir-exists
Ensure that `/etc/salt` exists
2015-07-30 19:03:34 -07:00
Chris Bednarski
c04e442203 Merge pull request #2518 from BayanGroup/fix-error-messages
Fix semantic errors in messages
2015-07-28 18:36:21 -07:00
AmirAli Moinfar
eba0e9eaf8 Ensure that /etc/salt exists
Make sure that directory `/etc/salt` exists before copying salt
minion file.
2015-07-28 10:40:09 +04:30
AmirAli Moinfar
769c82b171 Support for setting salt remote directory
* It is possible to set remote salt tree through `remote_state_tree` argument.
* It is possible to set remote pillar root through `remote_pillar_roots` argument.
* Directories `remote_state_tree` and `remote_pillar_roots` are emptied before use.
2015-07-28 10:37:52 +04:30
AmirAli Moinfar
f90f2f685d Fix semantic errors in messages 2015-07-28 10:34:13 +04:30
Gonzalo Peci
21107b0027 Fix wrong command type being used when running elevated provisioner. 2015-07-28 16:14:32 +12:00
Chris Bednarski
715662f60b Reformat 2015-07-27 16:42:06 -07:00
Jaime Soriano Pastor
be8c9dddf2 Puppet masterless provisioner optionally cleans staging directory
When puppet is executed in masterless mode it didn't remove
staging directory, this can be a problem because it leaves all
the modules and manifests in the built image.
This is specially problematic when building docker images as they
can be left in the layers unless an specific cleanup is done after
running puppet.

This change adds a flag `clean_staging_directory` to puppet
masterless provisioner so it takes care of this cleanup.
2015-07-17 22:24:23 +02:00
Chris Bednarski
56745e14f5 manifest_file can now be a folder or file.pp and we will upload it correctly in either case 2015-07-16 19:15:16 -07:00