frankdannhauer
893d0334f1
Fix #5335
...
https://github.com/hashicorp/packer/issues/5335
2017-12-14 14:00:52 +01:00
Dave Sanderson
fc566a3cb4
Added test for new commands and guest os type
2017-12-13 11:16:21 -07:00
Dave Sanderson
bf7a4b3363
remove erroraction on win removedir
2017-12-13 10:49:38 -07:00
Dave Sanderson
284b069003
Fixed stating of files on windows
...
added directory existence check to salt provisioner before directory clean up
2017-12-13 10:20:27 -07:00
Dave Sanderson
57770de36f
revert file stat
2017-12-12 16:01:00 -07:00
Dave Sanderson
a1ba4e5362
Silently continue on removeDir for Windows
...
Fixed parameter type exclusion in movePath command
2017-12-12 15:32:40 -07:00
Dave Sanderson
887b7dc476
Fix mixed case for mv
2017-12-12 15:24:34 -07:00
Dave Sanderson
aee67d3933
Add ability to move files on remote system
...
Fix salt-masterless to use generic MovePath
2017-12-12 15:22:10 -07:00
Dave Sanderson
857e5d04d3
Fix command error for salt install
2017-12-12 15:11:29 -07:00
Dave Sanderson
666796e8eb
Add ability to stat a remote path
2017-12-12 14:39:13 -07:00
Dave Sanderson
630b7466d6
updated test to remove old DefaultTmpDir reference
...
Fixed sudo logic
Fixed error message format issue for OSType check
2017-12-12 11:49:10 -07:00
Dave Sanderson
0efda50354
Initial Windows support
2017-12-12 11:36:38 -07:00
Megan Marsh
19c997cb0e
revert to using UI becuase the remote command syntax breaks things on linux with vmware fusion.
2017-12-07 09:08:12 -08:00
SwampDragons
753d3cf216
Merge pull request #5618 from kwilczynski/ansible-local-clean-staging-directory
...
ansible-local: Add ability to clean staging directory.
2017-11-30 14:27:59 -08:00
Casey Robertson
8f02150178
Changes Linux install URL to omnitruck. Changes powershell install to use omnitruck rather than hard-coded 32-bit url
2017-11-28 14:23:12 -08:00
Krzysztof Wilczynski
10370adbab
ansible-local: Add ability to clean staging directory.
...
Signed-off-by: Krzysztof Wilczynski <kw@linux.com>
2017-11-21 21:09:01 +01:00
SwampDragons
ce1f2457fd
Merge pull request #5563 from hashicorp/fix_5483
...
make restart command work correctly even if user has their own check …
2017-11-09 16:16:47 -08:00
Megan Marsh
c3cb7fe9f9
read from stderr so it doesnt lock up
2017-11-09 15:52:49 -08:00
Megan Marsh
9b1ae530c3
have separate stdout and stderr buffers
2017-11-09 15:35:28 -08:00
Matthew Hooker
e073d63f30
remove racy reuse of single buffer for remotecmd stderr/out.
2017-11-09 15:22:47 -08:00
Megan Marsh
6019e41544
dont read stderr
2017-11-09 15:18:43 -08:00
Megan Marsh
73b6247fd2
remove unnecessary boolean operator
2017-11-09 15:04:25 -08:00
Megan Marsh
e56a6dc9a0
add some comments
2017-11-09 14:55:12 -08:00
Megan Marsh
a739623d9b
don't pipe restarted stuff through the ui
2017-11-09 14:44:26 -08:00
Megan Marsh
d71bc34dfc
don't need this in a loop
2017-11-09 11:49:12 -08:00
Megan Marsh
d81871171c
make restart command work correctly even if user has their own check command
2017-11-07 15:01:02 -08:00
DanHam
4b89fc1c00
Fix tests post changes. Add test for upload func.
2017-10-30 21:08:14 +00:00
DanHam
5949bc91c4
Extend upload and subsequent 'dot sourcing' of env vars to std PS command
...
* Wrap funcs to flatten and upload env vars with new func prepareEnvVars.
While the wrapped funcs could be combined, keeping them separate
simplifies testing.
* Configure/refactor std and elevated PS to use new funcs to prepare,
upload and dot source env vars.
* Dot sourcing the env vars in this way avoids the need to embed them
directly in the command string. This avoids the need to escape the env
vars to ensure the command string is correctly parsed.
* Characters within the env vars that are special to PS (such as $'s
and backticks) will still need to be escaped to allow them to be
correctly interpreted by PS.
* The std and elevated PS commands now inject env vars into the remote
env via the same mechanism. This ensures consistent behaviour across the
two command types.
Fixes #5471
2017-10-30 21:08:13 +00:00
Matthew Hooker
ecad3348b3
rephrase log message.
2017-10-26 10:41:49 -07:00
Ohad Basan
33b85b0130
Add suggestion for "expected_disconnect" option if disconnection occurs
2017-10-26 19:53:48 +03:00
Matthew Hooker
75111e49e9
remove convoluted pointer logic
2017-10-11 23:35:24 -07:00
Matthew Hooker
bafcf7dfb1
test, document, cleanup puppet guest codde
2017-10-03 11:39:33 -07:00
Matthew Hooker
7523cc76de
Merge pull request #5340 from c22/issue_5339
...
Fix regression bug reported in #5339
2017-10-03 10:44:41 -07:00
Matthew Hooker
d26e28a028
Merge pull request #5341 from c22/issue_5338
...
Fix facterVar separator bug reported in #5338
2017-09-29 09:49:22 -07:00
DanHam
fa5fd602aa
Fix tests post changes
2017-09-26 11:07:26 +01:00
DanHam
8214a12a2a
Move append of portion of command used to send elevated PS output to file
2017-09-26 11:07:26 +01:00
DanHam
2a060adbf8
Don't use -EncodedCommand with PS as progress stream always leaks to stderr
...
* Setting $ProgressPreference to SilentlyContinue makes no difference
when -EncodedCommand is used - any output to the progress stream
still appears on stderr.
* Delete file containing encode/decode functions since we no longer
need them.
* Fixes leak of output on progress streams for both normal and elevated
commands.
* Since we no longer base64 encode, ensure any characters special to XML
are correctly escaped in the elevated command. This ensures correct
parsing once the command is wrapped within the elevatedTemplates XML
based Task Scheduler definition.
Fixes #4322
2017-09-26 11:07:11 +01:00
Matthew Hooker
2297cfaee2
Merge pull request #5357 from lochnesh/fix-windows-chef-solo-version
...
use flag -version instead of -v to install chef-solo on Windows
2017-09-25 18:18:16 -05:00
DanHam
5374c6e367
Use system context env var to set path for elevated PS env vars file
2017-09-21 12:08:29 +01:00
Skyler Nesheim
52d3137b08
use flag -version instead of -v to install chef-solo on Windows
2017-09-18 09:43:02 -05:00
Matthew Hooker
70e493a2c2
fix directory permissions when using sudo
2017-09-15 10:48:50 -07:00
Matthew Hooker
af1187d5e1
simplify a bit
2017-09-15 10:06:54 -07:00
Megan Marsh
b05c673a14
Update powershell provisioner test with new default
2017-09-15 08:17:17 -07:00
Megan Marsh
cbe1d7d854
simplify file upload for elevated powershell wrapper
2017-09-14 17:01:48 -07:00
Megan Marsh
92e70757bb
Move env vars into a file that we dot-source instead of trying to write them all to the command line
2017-09-14 17:00:57 -07:00
Megan Marsh
d458628529
exclude elevated_executed_command from config interpolation so it can be used correctly later
2017-09-14 10:50:32 -07:00
c22
948f955758
Fix regression bug reported in #5339
2017-09-14 11:44:14 +10:00
c22
cb12cd6668
Fix facterVar separator bug reported in #5338
2017-09-14 11:35:54 +10:00
Megan Marsh
c6889ad009
clarify logging by changing 'shell' to 'powershell' inside of the powershell provisioner
2017-09-06 11:59:25 -07:00
Megan Marsh
959db1ac16
add echo test to winrm connection.
2017-09-01 15:26:41 -07:00
Matthew Hooker
54920422ea
Merge pull request #5252 from c22/packer_4391_rework
...
#4391 rework (see #4426 )
2017-08-31 13:46:48 -07:00
Megan Marsh
f15304aa59
Merge pull request #5272 from hashicorp/fix_5064
...
Fix post-restart powershell failure
2017-08-28 11:41:37 -07:00
Megan Marsh
401c718a59
set default for ExpectDisconnect to false
2017-08-24 14:46:52 -07:00
Megan Marsh
b1001264ed
fix windows-restart tests
2017-08-24 14:30:15 -07:00
Megan Marsh
b2923b4da6
check stdout to make sure echo command actually goes through before counting computer as fully restarted
2017-08-24 12:10:27 -07:00
Megan Marsh
89b058604d
update tests for pull 5272
2017-08-22 14:20:40 -07:00
Megan Marsh
5214851463
make every script name unique
2017-08-22 14:03:28 -07:00
c22
42f1aa7a95
Refactor puppet-masterless based on puppet-server
2017-08-22 14:10:37 +10:00
c22
bc2e3de06d
Resolve merge conflicts and update documentation.
2017-08-22 14:10:37 +10:00
c22
80ba99c04f
Update documentation + small fixes
...
Updated the puppet-masterless documentation
Removed extraneous ConfigTemplate code
2017-08-22 14:10:37 +10:00
c22
fbac46af91
Linting + formatting
2017-08-22 14:10:37 +10:00
Sam Kerr
bcd30ad2f2
Update puppet-masterless commands to be OS specific
...
Previous implementation hardcoded "mkdir -p" which is fine for Unix, but
fails on Windows. This change draws on the example in the chef-solo
provisioner on how to detect the OS in use and use an appropriate mkdir
command.
In addition to updating the mkdir command, the actual executeCommand
needs to be OS specific, since Windows doesn't have sudo and Unix
doesn't require 'SET' when trying to change the value of a variable.
Modify the actual Windows command used to run Puppet.
Since the Facter vars on Windows are set with 'SET <varname>=<value>', a
'&&' is needed between the SET commands and the actual Puppet
invocation.
2017-08-22 14:10:37 +10:00
c22
1c592f291e
Better Windows support in puppet-server
...
Reworking the puppet-server provisioner based on chef-client.
2017-08-22 14:10:37 +10:00
Brett Russ
7192c46e46
sudo prefix the command which cleans up `/srv/{salt,pillar}` as these are created with sudo in the packer driven salt bootstrapper
2017-08-11 21:26:16 -04:00
Luke Farnell
d9a5b69403
clean up ineffectual assignments
2017-08-07 13:20:01 -04:00
localghost
daca0c2efe
Remove accidental dependency to moby's ioutils package.
2017-07-10 22:05:42 +02:00
localghost
079cbc263f
Add tests for playbook_files with playbook_dir.
2017-07-10 21:58:46 +02:00
Zbigniew Kostrzewa
33ae9cb2bb
Add test for playbook_files using docker builder.
2017-07-10 08:19:29 +02:00
localghost
9ea6313b68
Fix playbook_files test on Windows.
2017-07-06 21:28:27 +02:00
localghost
f682045345
Test for ansible-local playbook_files with mocked Communicator.
2017-07-06 06:44:03 +02:00
Zbigniew Kostrzewa
41d0adfbdd
Add playbook_files to execute multiple ansible playbooks.
2017-07-01 23:21:07 +02:00
Matthew Hooker
b1f06bbebb
fix wording
2017-06-26 12:56:55 -07:00
Matthew Hooker
56979a1974
Revert "Universally provide POSIX semantics for the `shell` provisioner."
...
This reverts commit 1ba7f9cc20
.
2017-06-21 16:11:47 -07:00
Matthew Hooker
67e29e1eff
disambiguates windows-restart messages.
2017-06-21 10:51:23 -07:00
Matthew Hooker
11379dea70
Merge pull request #5009 from sjlamerton/salt_bin_dir
...
Add support for salt_bin_dir
2017-06-13 10:21:53 -07:00
Matthew Hooker
8f685b3bcd
ansible: add skip_version_check flag
2017-06-07 13:31:56 -07:00
Matthew Hooker
70b3d05fb3
Merge pull request #4760 from fajpunk/ansible-inventory-dir
...
inventory_directory option for ansible provisioner
2017-06-07 11:22:23 -07:00
Steven Lamerton
e953898890
Add support for salt_bin_dir
...
Allows specifying the path to salt-call, useful if it isn't on the
path.
2017-06-07 08:16:23 +01:00
Matthew Hooker
bc16c13b50
Merge pull request #4961 from magicalbob/grains
...
Grains
2017-06-06 12:37:18 -07:00
Matthew Hooker
74bf0b636b
Merge pull request #4791 from optix2000/master
...
Add version selection for chef-solo provisioner
2017-06-05 15:30:48 -07:00
Ian Ellis
31f66b6fe9
Cloned GrainsFile test from MinionConfig test
2017-06-04 13:03:50 +01:00
Ian Ellis
912fc9c2af
Added grains_file config item to copy file to /etc/salt/grains
2017-06-04 08:31:30 +01:00
Sean Chittenden
1ba7f9cc20
Universally provide POSIX semantics for the `shell` provisioner.
...
All platforms everywhere have `env(1)` available, leverage it
accordingly.
Improves on: #2343
2017-05-20 09:28:02 -07:00
Matthew Hooker
7999f886b1
Merge pull request #4792 from mkuzmin/slash
...
provisioner/ansible-local: Convert Windows paths with backslashes to …
2017-04-26 15:20:49 -07:00
Dan Fuchs
8401057ed5
Merge branch 'master' into ansible-inventory-dir
2017-04-26 13:20:00 -05:00
Rickard von Essen
999f2da499
ansible-local/ansible: Add extra-vars packer_*
...
Added:
- `packer_build_name`
- `packer_builder_type`
- `packer_http_addr` - `ansible-local` only
Closes : #4820
2017-04-23 12:55:01 +02:00
Dan Fuchs
97c819dc15
Merge branch 'master' of https://github.com/mitchellh/packer into ansible-inventory-dir
2017-04-20 10:34:03 -05:00
Weilu Jia
b1c5ccd3e2
Add version selection for chef-solo provisioner in Windows too
2017-04-17 18:16:34 -07:00
Michael Kuzmin
795921988e
provisioner/ansible-local: Convert Windows paths with backslashes to Unix style
2017-04-13 12:15:00 +03:00
Weilu Jia
c418307162
Add version selection for chef-solo provisioner
...
Prevents issues such as #1751 when chef changes major versions
2017-04-12 16:18:00 -07:00
Dan Fuchs
f45f4568db
make validateInventoryDirectoryConfig function
2017-04-06 14:50:02 -05:00
Dan Fuchs
39a9eac44f
Remove `req` param from validateDirectoryConfig
2017-04-05 09:14:30 -05:00
Dan Fuchs
3fc809c05b
Ansible provisioner: check if inventory directory exists during prepare
2017-04-04 22:49:24 -05:00
Dan Fuchs
492bff474b
Ansible provisioner: Specify full path to generated inventory file
2017-04-04 22:04:26 -05:00
Dan Fuchs
609e70face
inventory_directory option for ansible provisioner
...
Add an `inventory_directory` setting to the Ansible provisioner that
allows a user to specify a directory in which the Packer Ansible
provisioner would write the generated inventory file. If a value is
specified for this setting, then have the Packer Ansible provisioner
pass this directory as the -i arg when it calls ansible.
This would allow an Ansible playbook used by the Packer Ansible
provisioner to use variables specified in `host_vars` and `group_vars`
in this inventory directory.
2017-04-04 16:43:46 -05:00
Matthew Hooker
81522dced0
move packer to hashicorp
2017-04-04 13:39:01 -07:00
Matthew Hooker
6f27f67346
more fixes from errcheck
2017-03-29 13:38:31 -07:00
Matthew Hooker
de296ac06b
simplify
2017-03-28 20:45:25 -07:00
Matthew Hooker
35578d9ed1
remove unnecessary type conversions
2017-03-28 20:36:21 -07:00
Matthew Hooker
79287d7e47
simplify some code
2017-03-28 20:36:20 -07:00
Matthew Hooker
0149f679de
Print instead of Printf with no dynamic first variable.
2017-03-28 20:36:20 -07:00
Matthew Hooker
d1b20b3d9c
remove a bunch of dead code.
...
https://github.com/dominikh/go-tools/tree/master/cmd/unused
2017-03-28 20:36:20 -07:00
Matthew Hooker
230079f73a
spell fixes
2017-03-28 20:36:19 -07:00
Andrey Chernih
7548024720
More verbose error message when ansible-playbook fails
...
I've spent 1 hour today debugging why packer does not want to work with
ansible. It turns out `ansible-playbook` command was returning non-zero
exit status because of the file system permission problem.
Output before change:
% packer build rabbitmq.json
amazon-ebs output will be in this color.
1 error(s) occurred:
* exit status 1
Output after change:
amazon-ebs output will be in this color.
1 error(s) occurred:
* Error running "ansible-playbook --version": exit status 1
2017-03-21 20:26:41 -07:00
Matthew Hooker
6894f93085
Merge pull request #4534 from mitchellh/chefclean
...
provisioner/chef-client: only upload knife config if we're cleaning
2017-02-26 18:46:15 -08:00
Marc Carmier
78ab21b42f
Test error messages for restart_command and restart_timeout seems to be erroneous
2017-02-12 18:17:31 +01:00
Matthew Hooker
825f69c64d
provisioner/chef-client: only upload knife config if we're cleaning
2017-02-09 23:37:35 -08:00
Matthew Hooker
a836268490
fix test on windows
2017-02-06 11:29:39 -08:00
Matthew Hooker
0f445dff07
fix tests
2017-02-03 15:03:19 -08:00
Matthew Hooker
45030e1919
provisioner/anisble: use randomized staging dir
2017-01-27 16:14:35 -08:00
DanHam
370b67497e
provisioner/powershell: Don't over complicate removal of tmp output file
2017-01-26 11:21:45 +00:00
DanHam
21be983855
provisioner/powershell: Use system context env var to set output file path
...
Fixes #4271
2017-01-26 00:17:46 +00:00
DanHam
e350739ecb
post-processor/shell-local: expand tests to align with shell provisioner
2017-01-23 22:25:39 +00:00
DanHam
28051a9218
provisioner/windows-shell: fix and compact env var test
2017-01-23 12:10:46 +00:00
DanHam
e8db6b9b9a
provisioner/windows-shell: Remove env var check - again checked in prepare
2017-01-23 12:10:46 +00:00
DanHam
c88fafdf38
provisioner/powershell: align, fix and compact env var test
2017-01-23 12:10:46 +00:00
DanHam
4122f3a897
provisioner/powershell: Remove env var check - we already check in Prepare
2017-01-23 12:10:46 +00:00
DanHam
4514b1b10f
provisioner/shell: expand tests to align with powershell/win-shell
2017-01-23 12:10:46 +00:00
DanHam
0cbb4ff30c
provisioner/shell: Align gen of flattened env vars with powershell/win-shell
...
* Move code to generate quoted flattened env vars to separate function
* Fix: generate flattened env vars once per provisioner not once per script
2017-01-23 12:10:46 +00:00
DanHam
80ebcea5e1
Mirror cleaner test code back from windows-shell to powershell
2017-01-19 13:33:59 +00:00
DanHam
2bd9fa6c70
Use counter for index. Sort stray comments.
2017-01-19 12:12:00 +00:00
Matthew Hooker
c33cef9c12
tests for equals in windows-shell
2017-01-18 12:51:14 -08:00
DanHam
49bc2e353f
Fix to allow equals in value of environment variable. Mirrors #4328
2017-01-18 12:42:25 -08:00
Matthew Hooker
4e6a44f5f1
append will resize
2017-01-17 17:21:14 -08:00
Matthew Hooker
480398c3d2
only set PACKER_HTTP_ADDR if a server is listening
2017-01-17 17:17:36 -08:00
Matthew Hooker
6563eb213c
Document. add to windows-shell and powershell
2017-01-17 17:07:36 -08:00
Matthew Hooker
d2e59e4e92
set PACKER_HTTP_ADDR env var when available.
...
If using a builder that has an http server set up for file transfer,
expose the connection info to the shell provisioner through the environment
variable PACKER_HTTP_ADDR.
Closes #2869
2017-01-16 23:19:52 -08:00
Matthew Hooker
5fc6a2ee70
Merge pull request #4326 from asteris-llc/feature/converge-provisioner
...
New Provisioner: Converge
2017-01-04 10:46:18 -08:00
Matthew Hooker
6d6c7864b4
Merge pull request #4328 from DanHam/gh-3108
...
Allow equals sign in value of environment variable for Powershell provisioner
2017-01-03 12:38:17 -08:00
Sean Malloy
a617884a16
Add more tests for puppet-masterless provisioner
...
* Add tests for staging_directory config option
* Add tests for working_directory config option
2016-12-28 21:14:17 -06:00
Brian Hicks
feab6f096e
provisioner(converge): add prevent_bootstrap_sudo
2016-12-28 12:53:22 -06:00
Brian Hicks
fb6a5c5bbc
provisioner(converge): change skip_bootstrap back to bootstrap
2016-12-28 12:49:40 -06:00
Brian Hicks
64ebd3af8d
provisioner(converge): remove version validation
2016-12-28 08:49:08 -06:00
Brian Hicks
18425c45d0
provisioner(converge): change bootstrap to skip_bootstrap
2016-12-28 08:48:02 -06:00
Brian Hicks
5d935767f0
provisioner(converge): add bootstrap_command
2016-12-28 08:45:19 -06:00
Brian Hicks
843731d98d
provisioner(converge): add prevent_sudo
2016-12-28 08:19:03 -06:00
Sean Malloy
c226b19d08
Add additional unit tests for puppet-server provisioner
...
* Add puppet-server test for staging_dir config option
* Add puppet-server test for execute_command config option
2016-12-27 22:35:13 -06:00
DanHam
0423f91037
Fix to allow equals sign in value of environment variable
2016-12-28 00:33:16 +00:00
DanHam
be0196492f
Tests for env variables values starting with or containing an equals sign
2016-12-28 00:31:17 +00:00
Brian Hicks
3311d3a48d
provisioner(converge): interpolate execute_command
2016-12-27 16:48:11 -06:00
Brian Hicks
fe4b972d32
provisioner(converge): flatten execution fields
2016-12-27 16:32:19 -06:00
Brian Hicks
3658a0b6b5
provisioner(converge): remove log line
2016-12-27 16:31:12 -06:00
Brian Hicks
de918ac7a7
provisioner(converge): rename directory to working_directory
2016-12-27 16:07:16 -06:00
Brian Hicks
e6ba4c1929
provisioner(converge): remove version check
2016-12-27 16:03:35 -06:00
Brian Hicks
549ff50a3c
provisioner(converge): handle http error
2016-12-27 14:58:41 -06:00
Brian Hicks
b46a402a18
provisioner(converge): add tests for Prepare
2016-12-27 14:47:13 -06:00
Brian Hicks
73252b9a9b
provisioner(converge): reverse the meaning of bootstrap
2016-12-27 12:24:06 -06:00
Brian Hicks
b8849a9c2d
provisioner(converge): add version specification for bootstrapping
2016-12-27 12:22:17 -06:00
Brian Hicks
eca8690018
provisioner(converge): add actual provisioning step
2016-12-27 12:13:51 -06:00
Brian Hicks
73d5593242
provisioner(converge): add validate for source and destination
2016-12-27 11:41:52 -06:00
Brian Hicks
4f0034e574
provisioner(converge): transfer module directories
2016-12-27 11:29:36 -06:00
Brian Hicks
e2daefab71
provisioner(converge): improve error messages when Converge isn't found
2016-12-27 11:20:20 -06:00
Brian Hicks
03a8e309ba
provisioner(converge): add bootstrapping
2016-12-27 10:50:33 -06:00
Sean Malloy
ce43ade973
Add additional unit tests for puppet provisioners
...
* Add puppet-masterless test for packer_build_name default fact
* Add puppet-masterless test for packer_builder_type default fact
* Add puppet-server test for puppet bin directory
2016-12-26 23:11:27 -06:00
Sean Malloy
7feb8b993c
Add default facts for puppet-server provisioner
2016-12-22 15:53:59 -06:00
Taliesin Sisson
335615408a
Run go fmt on files
2016-12-12 22:45:19 +00:00
Taliesin Sisson
c88a2ef872
Remove trailing tabs
2016-12-12 22:45:10 +00:00
Taliesin Sisson
55353fae89
Fix spelling mistake
...
Fix code type for formatting
Remove empty space
2016-12-12 22:45:09 +00:00
Taliesin Sisson
f38d787b0e
Powershell uses UTF16Le for encodedCommand
2016-12-12 22:44:56 +00:00
Taliesin Sisson
e36051d394
Pattern for infrastructure changed to quote filename and execute file with ampersand as everything is run in powershell now
...
Handle powershell commands by specifying any extra infrastructure around running scripts inside of ExecuteCommand and ElevatedExecuteCommand
2016-12-12 22:44:55 +00:00
Taliesin Sisson
d61513bf77
Encode powershell using utf8
...
Fix a bug in the size of string that was returned when decoding a base64 string
Added tests around encoding and decoding powershell scripts. Used [System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes('powershell commands')) | clip to generate what base 64 strings should look like
2016-12-12 22:44:54 +00:00
Taliesin Sisson
17597b48e1
Base64 encode powershell to avoid any necessary escaping
2016-12-12 22:44:54 +00:00
Taliesin Sisson
5d5809b27e
Make hiding of progress backward compatible with old versions of powershell
2016-12-12 22:44:48 +00:00
Taliesin Sisson
e8c2b49be8
Use correct quotation of variables
2016-12-12 22:44:34 +00:00
Taliesin Sisson
4b394c8563
Write output will put ouput from function, so we don't want to be getting line from output of function
...
Fix unit tests for not showing progress stream when using powershell
Ensure that progress stream does not get leaked into stdout
Using Write-Output instead of Write-Host since PS v5 now leaks the host stream to stderr
2016-12-12 22:44:33 +00:00
Taliesin Sisson
c42cb88ddd
Using Write-Output instead of Write-Host since PS v5 now leaks the host stream to stderr
2016-12-12 22:44:32 +00:00
Taliesin Sisson
cd6213eb55
Seems like we do need to escape the double quote
2016-12-12 22:44:25 +00:00
Taliesin Sisson
15137310a7
Must escape string formatting for string fmt
2016-12-12 22:44:20 +00:00
Taliesin Sisson
5285a819dd
Quoting of powershell commands and associated tests
2016-12-12 22:44:19 +00:00
Taliesin Sisson
3051ea6633
Quote powershell so that it does not try to interpret command to be run
...
Get VName out of state. This allows template replacement to be run on vmname
2016-12-12 22:44:10 +00:00
Taliesin Sisson
6c3030c73a
Add a little safety around variables that are passed into provisioner.
2016-12-12 22:44:10 +00:00
Matthew Hooker
b49be38d74
Merge pull request #4210 from yoctocloud/fixes
...
various fixes
2016-12-12 12:33:19 -08:00
Matthew Hooker
c510988cbf
Merge pull request #4209 from bhcleek/ansible-winrm
...
provisioner/ansible: assume scp target is file (resolves winrm incompatibility)
2016-12-08 22:37:41 -08:00
Patrick Decat
5dd7fb11f4
Saltstack bootstrapping: fallback on wget if curl failed for any reason (such as not being installed)
2016-12-02 20:02:22 +01:00
Vasiliy Tolstov
00ebe9e1d3
various fixes
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
2016-11-29 14:55:44 +03:00
Billie Cleek
f5ca0de225
provisioner/ansible: assume scp target is file
...
Assume the scp target is a file instead of a directory. Assuming the scp
target is a file instead of a directory allows uploading files to a node
being provisioned with the ssh communciator using sftp and with the
winrm communicator. It is fully compatible with ansible; ansible
communicators only allow for files (never directories) to be uploaded
(when the copy module is used to upload a directory, ansible walks the
directory and uploads files one at a time).
Update documentation to explain how to provision a Windows image.
Extend tests that use ssh to communicate with the node to include single
files, recursive copies, and content-only recursive copies.
Add test to verify support for the winrm communicator.
Remove the err argument from adapter.scpExec, because it was unused.
Fixes #3911
2016-11-26 14:40:39 -08:00
Matthew Hooker
12176b6afc
provisioner/shell: treat disconnects as retryable.
2016-11-22 15:59:40 -08:00
Jasper Siepkes
200aa74e78
Added support for passing arguments to salt-call.
2016-11-11 15:15:16 +01:00
Rickard von Essen
a616c3da3c
provisioner/ansible: Move info messages to log
...
Make the ansible provisioner less noisy by moving most messages to the
log instead of ui print outs.
Closes #4117
2016-11-05 14:25:45 +01:00
Matthew Hooker
d920b3fbf4
run gofmt
2016-11-01 14:08:04 -07:00
Rickard von Essen
f17bd30070
Revert "Removed escaped quotes in non-elevated powershell invocation"
...
This reverts commit 1b186f1613
.
2016-10-26 21:12:11 +02:00
Rickard von Essen
3b42d28cce
Merge pull request #4014 from mexisme/feature/puppet-bin-dir
...
privisioner/puppet: Add `puppet_bin_dir` option.
2016-10-22 14:48:45 +02:00
Rickard von Essen
3361da82d4
Added trailing slash after puppet_bin_dir.
2016-10-22 14:34:34 +02:00
Matthew Hooker
892d5e82c9
expect_disconnect option
...
provisioner/shell: Adds option to fail if the remote server disconnects
us.
2016-10-21 11:39:03 -07:00
Matthew Hooker
a1ef6398c3
Merge pull request #3371 from simonguest/powershell-envvars-fix
...
Removed escaped quotes in non-elevated powershell invocation
2016-10-19 18:50:39 -07:00
mexisme
314a4f4bbf
Add Puppet Bin Dir to puppet-server provisioner
2016-10-16 02:50:37 +13:00
mexisme
6f9294095f
Add Puppet Bin Dir to puppet-masterless provisioner
2016-10-15 22:39:50 +13:00
Matthew Hooker
d8439b0034
Merge pull request #3971 from mitchellh/fix3486
...
change chef-solo provisioner staging directory
2016-10-14 15:51:26 -07:00
Rickard von Essen
3c8dabba9e
Fixed formatting
2016-10-11 23:43:50 +02:00
Matthew Hooker
83131db4b8
Merge pull request #3776 from curiositycasualty/master
...
Add custom_state config to salt provisioner
2016-10-07 17:59:52 -07:00
Matthew Hooker
2ae1b83b15
change chef-solo provisioner staging directory
...
Have the staging directory be called `packer-chef-solo`, which is what
is given in docs. Closes #3486
2016-10-07 17:24:30 -07:00
Rickard von Essen
51a9a51699
Update winrm and winrmcp dependencies
...
Updated winrm and winrmcp dependencies. Relevant unit and acceptance tests passed successfully.
shell.Execute didn't return a Command object.
See f1bcf36a69/winrmcp/cp.go (L167)
and 54ea5d0147/winrm/shell.go (L10-L22)
respectively.
Closes #3763
Original patch by: Philipp Kosel <philipp.kosel@gmail.com>
2016-10-03 13:48:29 -07:00
Matthew Hooker
a8e57d83d2
gofmt project.
...
noticed many unrelated changes being added to patches because of gofmt.
ran `find . -not -path "./vendor/*" -name "*.go" -exec gofmt -w {} \;`
2016-09-29 14:13:06 -07:00
Matthew Hooker
efa594bebe
Merge pull request #3899 from pengkh/f-file-provisioner
...
continue add support for file-provisioner to allow directory downloa…
2016-09-22 18:32:57 -07:00
开恒
96a637684b
fix #3897
...
bug fix for file-provisioner download file, including unit-test code.
2016-09-19 10:36:18 +08:00
nouney
59dac451a5
provisioner/file: add "generated" key to allow files created on-the-fly.
2016-09-15 22:15:56 +02:00
Billie H. Cleek
f760ab2fd8
Make SCP the default for provisioner/ansible
...
Add a new option, `use_sftp` to the ansible provisioner. It's default
value is false; ansible provisioner will use SCP by default.
Refactor to consistently set all configure options for ansible
provisioner in the Prepare step.
Remove incorrect information about `ANSIBLE_HOST_KEY_CHECKING=False`
being set when `ansible_env_vars` is not set in the packer template.
Update BATS tests for the ansible provisioner to actually check that the
fetched directory contains the contents expected. This revealed a
problem with the all_options template that required adding a host to the
hosts list in the test playbook.
2016-09-11 23:58:31 -07:00
Billie H. Cleek
e6a0e523e2
refactor sftp subsystem request handling
...
Refactor the sftp subsystem request handling to make it more similar to
an exec request. This simplifies and improves the readability of the
code.
2016-09-11 23:58:31 -07:00
Billie H. Cleek
da223b9539
add scp support to ansible provisioner
...
Handle running `scp -t` and `scp -f` exec requests in the
ansible-provisioner's SSH
server to allow Ansible to use SCP so that SFTP doesn't have to be
installed on the node.
Update the BATS tests to test the ansible provisioner.
2016-09-11 23:58:31 -07:00
Spencer Owen
9963bfcd42
removes unneeded white space
2016-09-01 13:39:44 -06:00
Spencer Owen
7fdd303641
Installs 64bit chef on windows if available
...
Resolves #3847
- Changes linux install url to new omnitruck.chef.io url.
- Changes powershell install to use omnitruck url instead of hard coded to 32bit msi install.
2016-09-01 13:23:08 -06:00
Rickard von Essen
d1e38052f7
Merge pull request #3350 from JoakimLofgren/add-support-for-ansible-galaxy
...
Add support for ansible-galaxy
2016-09-01 20:51:17 +02:00
Billie Cleek
023f2edde8
add better logging and error handling to ansible provisioner ( #3477 )
2016-08-24 19:53:39 +02:00
Isa
bb2dd6e2b2
add custom_state config to salt provisioner
2016-08-03 12:56:51 -07:00
Chris Bednarski
32cbb515b5
Merge pull request #3692 from mohae/3474-file-mkdir-all
...
3474 file mkdir all
2016-07-07 16:44:15 -07:00
Joel Scoble
94d158b0b7
remove debug fmt.Print from test
2016-07-07 18:12:54 -05:00
Ricard Clau
049fb2d9c1
actually check for errors in functional tests
2016-07-07 20:01:23 +01:00
Ricard Clau
0c81e49f83
Adding a functional test with an Ansible message very long
2016-07-07 01:12:57 +01:00
Chris Bednarski
664e640257
Merge pull request #3392 from msteinhoff/fix-ansible-provisioner-long-lines
...
Fix Scanner buffer too long error in ansible-remote provisioner
2016-07-06 15:27:57 -07:00
Joel Scoble
999b8b2ed0
file provisioner: download should create all dirs in the destination path
2016-07-06 15:42:26 -05:00
Jamie Snell
7b3224f3c7
rename KnifeChefTemplate to KnifeTemplate
2016-06-14 13:42:53 -05:00
Jamie Snell
4847e891b0
Fix knife clean-up run on windows
2016-06-14 13:34:25 -05:00
Tom Asquith
40aa2b9973
added support for specifying an execute command to the puppet-server provisioner.
2016-06-13 14:12:28 +01:00
Billie Cleek
49067e732a
append ANSIBLE_HOST_KEY_CHECKING correctly ( #3568 )
...
Append the ANSIBLE_HOST_KEY_CHECKING environment variable correctly
regardless of whether the template specifies some environment variables.
2016-05-24 15:34:51 -07:00
Justin Nauman
f2b0fabe66
Fixes #3466 - Remote path needs to be set prior to config interpolation ( #3468 )
2016-04-29 19:21:27 -07:00
Ian Duffy
7e653370b7
Seperate remote_path into remote_folder and remote_script. ( #3462 )
...
Commonly /tmp is set as noexec, as a result packer scripts
fail to run. In order to get around this one can set a
remote_path, whoever, remote path requires full filename
and path.
By making remote_path a combination of
remote_folder/remote_script we can change remote_folder
and keep the default script_nnn.sh
Signed-off-by: Ian Duffy <ian@ianduffy.ie>
2016-04-26 16:04:29 -07:00
Mario Steinhoff
b5f6e379f0
Fix Scanner buffer too long error in ansible-remote provisioner
...
Ansible may produce very long lines which Scanner can not handle. This
replaces the Scanner with a Reader and uses the ReadString method to
read an arbitrary large line from the ansible-playbook stdout pipe.
2016-03-28 21:27:42 +02:00
Simon Guest
1b186f1613
Removed escaped quotes in non-elevated powershell invocation
2016-03-20 20:28:08 -07:00
Joakim Löfgren
1172e670c0
Add support for ansible-galaxy
...
This adds "galaxy_file" to the options
Implement #3301
2016-03-14 18:26:56 +01:00
Keyan Pishdadian
f3811cb99d
Add ignore_exit_codes param for puppet-masterless provisioner
2016-03-13 23:39:18 -04:00
Rickard von Essen
d59844f0d1
Determine current user without CGO.
2016-03-07 13:35:24 +01:00
Rickard von Essen
7369841e63
Ansible: add the support for specifying ansible_user
...
Closes #3273
2016-03-07 13:35:24 +01:00
Rickard von Essen
d6716f6ee1
Ansible: don't use deprecated ssh options when ver above 2.0
...
Ansible 2.0 deprecated ansible_ssh_user, ansible_ssh_port, ansible_ssh_host
instead use ansible_user, ansible_port, and ansible_host in the
inventory file.
Closes #3275
2016-03-07 13:26:22 +01:00
Rickard von Essen
f823725e53
Ansible: os.Environ() should always be passed to the ansible command.
...
Fixes GH-3271
Regression introduced in GH-3203
2016-02-26 20:49:37 +01:00
Vespian
4750da3457
Add empty_groups param to ansible provisioner
2016-02-19 23:46:50 +01:00
Marat Bakeev
2791542171
Allow specifying environment variables for ansible provisioner
2016-02-15 13:07:02 +13:00
Chris Bednarski
6dd02e7912
Update ansible test to use the new Downloader interface
2016-02-12 14:53:23 -08:00
Vasiliy Tolstov
feee19e4ed
file provisioner improvements
...
* allow specify source/destination as dir
* allow specify many files as source
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
2016-02-12 11:48:28 -08:00
Chris Bednarski
d8aaf6175f
Merge pull request #2470 from jsoriano/puppet-masterless-clean-staging
...
Puppet masterless provisioner optionally cleans staging directory
2016-02-11 17:39:35 -08:00
Chris Bednarski
3ae867446d
Merge pull request #2660 from mafrosis/saltp
...
Salt provisioner updates
2016-02-11 16:37:06 -08:00
Billie H. Cleek
0cd54ed19e
add options to configure host alias and groups
2016-02-10 23:33:14 -08:00
Chris Bednarski
a6552f7c75
Merge pull request #3166 from ephemeralsnow/master
...
Add chmod to chef-solo provisioner
2016-02-10 19:23:47 -08:00
Billie Cleek
a5ab53bf5e
update ansible tests
...
Update tests to account for changes made in #3149
2016-02-10 14:16:02 -08:00
Billie Cleek
a23610ef41
cleanup ansible provisioner key generation
...
* Clearly separate host signer and user key generation into separate
functions and data structures.
* Remove inaccurate comment about needing to specify both files if
either one is specified.
* Rename parameters for clarity according to their meaning to the
callee.
* Style the code with gofmt.
2016-02-10 14:16:02 -08:00
ephemeralsnow
3de8561a75
Add chmod to chef-solo provisioner
2016-02-09 20:06:26 +09:00
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
Schreiter, Wulf-Thilo
18438cf291
Add knife config by template
...
Since the chef-client provisioner is cleaning the node and client at the chef-server from the provisioned node
it needs to have a flexible configuration
This is replacing the used knife flags: -s '<chef-server-url>' -k '/tmp/packer-chef-client/client.pem' -u '<client-name>'
and puts their values into a generated knife.rb
Additionally the knife.rb may include the optional ssl_verify_mode attribute to enable the verify mode verify_none
Background:
When deleting node and client to a self-hosted chef-server using self signed cerfiticates the usage of
knife node delete <node-name> -y -s '<chef-server-url>' -k '/tmp/packer-chef-client/client.pem' -u '<client-name>'
will lead into a ssl verification failure.
The error output of the knife call is somthing like:
2015/06/24 12:29:17 ui: docker: WARNING: No knife configuration file found
docker: WARNING: No knife configuration file found
2015/06/24 12:29:17 ui: docker: ERROR: SSL Validation failure connecting to host: 172.16.117.63 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B:
certificate verify failed
docker: ERROR: SSL Validation failure connecting to host: 172.16.117.63 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
2015/06/24 12:29:17 ui: docker: ERROR: Could not establish a secure connection to the server.
docker: ERROR: Could not establish a secure connection to the server.
2015/06/24 12:29:17 ui: docker: Use 'knife ssl check' to troubleshoot your SSL configuration.
docker: Use 'knife ssl check' to troubleshoot your SSL configuration.
2015/06/24 12:29:17 ui: docker: If your Chef Server uses a self-signed certificate, you can use
docker: If your Chef Server uses a self-signed certificate, you can use
2015/06/24 12:29:17 ui: docker: 'knife ssl fetch' to make knife trust the server's certificates.
docker: 'knife ssl fetch' to make knife trust the server's certificates.
2015/06/24 12:29:17 ui: docker:
docker:
2015/06/24 12:29:17 ui: docker: Original Exception: OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
docker: Original Exception: OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
2015/06/24 12:29:17 packer-builder-docker: 2015/06/24 12:29:17 Executed command exit status: 100
2015-06-24 15:22:59 +02:00
Vasiliy Tolstov
036c9ddf7c
fix file download provisioner
...
when file used with download direction we don't need
to check source on builder because it on machine.
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
2015-06-23 12:27:27 +03:00
Mitchell Hashimoto
b77042dc85
provisioner/shell-local: fix vet
2015-06-22 15:01:22 -07:00
Mitchell Hashimoto
5db4d7c01f
fmt
2015-06-22 12:37:52 -07:00
Mitchell Hashimoto
288b9a70f6
Merge pull request #1657 from njhartwell/master
...
Adding disable sudo support to salt masterless
2015-06-22 12:37:30 -07:00
Mitchell Hashimoto
11e325738b
Merge branch 'ansible-inventory-groups' of https://github.com/lyrixx/packer into lyrixx-ansible-inventory-groups
2015-06-22 12:35:50 -07:00
Mitchell Hashimoto
7c8e86c9c5
provisioner/*: fix interpolation context
2015-06-22 12:26:54 -07:00
Mitchell Hashimoto
0e8036a023
Merge pull request #2283 from mitchellh/f-local-shell
...
Local shell provisioner
2015-06-22 12:18:48 -07:00
Mitchell Hashimoto
6ec428cc38
provisioner/shell: retry file delete [GH-2286]
2015-06-21 19:53:43 -07:00
Mitchell Hashimoto
2dc6155c30
provisioner/shell-local: tests
2015-06-19 15:27:44 -07:00
Mitchell Hashimoto
80fc1f032b
provisioner/shell-local: a first stab
2015-06-19 15:06:06 -07:00
Mitchell Hashimoto
59766067c0
provisioner/windows-restart: make test pass on slow machines
2015-06-19 06:13:51 +02:00
Mitchell Hashimoto
873bc7471f
Merge pull request #2280 from flopex/ignore_exit_codes
...
provisioner/puppet-server: Add ignore exit codes option
2015-06-19 06:08:29 +02:00
Mitchell Hashimoto
4463083a60
provisioner/shell: randomize default script name
2015-06-18 10:38:23 +02:00
Mitchell Hashimoto
b2609db395
provisioner/windows-restart: fix potential panic case
2015-06-17 18:22:27 +02:00
Mitchell Hashimoto
7711e07f05
provisioner/windows-restart: test fix
2015-06-17 17:56:31 +02:00
Mitchell Hashimoto
49769a17c2
Merge pull request #2243 from mitchellh/f-powershell
...
Windows provisioners: powershell, windows-shell, windows-restart
2015-06-17 17:51:42 +02:00
Mitchell Hashimoto
5ee02b09b2
Merge pull request #2258 from mitchellh/b-puppet-manifest-base
...
provisioner/puppet-masterless: only base if manifest is a file [GH-1933]
2015-06-17 17:51:07 +02:00
Gonzalo Peci
af4d8b99b4
Add quickfix to restart provisioner as existing one was not working.
...
For more information read https://github.com/mitchellh/packer/pull/2243
2015-06-17 12:29:10 +12:00
Mitchell Hashimoto
8990c38d5e
provisioner/puppet-masterless: deprecation warning
2015-06-16 09:38:24 -07:00
Mitchell Hashimoto
6cda4fa548
Merge branch 'default_facts' of https://github.com/danzilio/packer into danzilio-default_facts
2015-06-15 15:29:23 -07:00
Mitchell Hashimoto
65916514c0
Merge branch 'puppet_working_dir' of https://github.com/ColinHebert/packer into ColinHebert-puppet_working_dir
2015-06-15 15:17:45 -07:00
Mitchell Hashimoto
5d38ee939b
Merge pull request #2259 from mitchellh/b-shell-delete
...
provisioner/shell: remove file after exec [GH-1536]
2015-06-15 15:15:51 -07:00
Mitchell Hashimoto
6c80228661
provisioner/shell: missing error arg
2015-06-15 15:11:08 -07:00
Alexander Golovko
500d83b673
add download support to file provisioner
2015-06-15 15:08:56 -07:00
Mitchell Hashimoto
a235419c7d
provisioner/shell: remove file after exec [GH-1536]
2015-06-15 15:02:59 -07:00
Mitchell Hashimoto
742e556836
provisioner/puppet-masterless: only base if manifest is a file [GH-1933]
2015-06-15 14:44:54 -07:00
Mitchell Hashimoto
711dfc9d0a
provisioner/chef: show command in output
2015-06-15 14:35:54 -07:00
Mitchell Hashimoto
14787fd4cc
provisioner/chef-client: run cleanup on node [GH-1295]
2015-06-15 14:29:12 -07:00
Mitchell Hashimoto
106c9403ed
provisioner/chef-client: chmod the directories
2015-06-15 13:41:07 -07:00
Mitchell Hashimoto
bee3b59c40
Merge branch 'chef-client-client_key' of https://github.com/ameir/packer into ameir-chef-client-client_key
2015-06-15 13:40:33 -07:00
Mitchell Hashimoto
ab6a330d86
provisioner/*: fix go vet
2015-06-14 12:39:39 -07:00
Mitchell Hashimoto
339a4ccdab
provisioner/windows-shell
2015-06-14 11:23:29 -07:00
Mitchell Hashimoto
840ddb4f20
provisioner/windows-restart
2015-06-14 11:14:47 -07:00
Mitchell Hashimoto
040ff0706d
provisioner/powershell
2015-06-14 11:01:28 -07:00
Mitchell Hashimoto
c549fce85e
provisioner/shell: escape single quotes [GH-2067]
2015-06-13 14:11:20 -04:00
Mitchell Hashimoto
7830d78d06
provisioner/shell: fix tests
2015-06-11 17:24:02 -04:00
Mitchell Hashimoto
b28f946be9
Merge pull request #2210 from mitchellh/b-set-e
...
provisioner/shell: set -e for inline [GH-2069]
2015-06-11 17:19:43 -04:00
Mitchell Hashimoto
3ed73852be
provisioner/shell: set -e on the shebang itself
2015-06-11 17:19:23 -04:00
Mitchell Hashimoto
a995df352e
provisioner/shell: uploaded script should be 0755 [GH-1708]
2015-06-10 21:18:46 -07:00
Mitchell Hashimoto
952077ccb0
provisioner/shell: set -e for inline [GH-2069]
2015-06-10 21:02:22 -07:00
Mitchell Hashimoto
2b4df93f2f
provisioner/*: interpolation
2015-05-27 14:50:20 -07:00
Mitchell Hashimoto
c2381be44f
provisioner/*: convert to interpolation
2015-05-27 14:41:47 -07:00
Francisco Lopez
758618ecaa
Add ignore_exit_codes key for provisioner puppet-server
2015-05-14 15:05:44 -07:00
Nathan Hartwell
c4cee75b93
Adding tests for disable sudo
2015-05-13 08:32:09 -05:00
Nathan Hartwell
d0d3229f96
Merge branch 'master' of https://github.com/mitchellh/packer
...
Conflicts:
provisioner/salt-masterless/provisioner.go
2015-05-13 08:13:38 -05:00
Grégoire Pineau
cd14cb7012
[Provisioner][Ansible] Added support for inventory group
2015-04-30 18:43:00 +02:00
Ameir Abdeldayem
5c06af872d
Support chef-client 'client_key' and default to <staging
...
dir>/client.pem.
2015-04-09 02:15:16 -04:00
Emil Hessman
3165b0c936
provisioner/salt-masterless: fix incorrect printf verb types
...
Fixes the following vet reports:
provisioner/salt-masterless/provisioner.go:119: arg cmd for printf verb %s of wrong type: *github.com/mitchellh/packer/packer.RemoteCmd
provisioner/salt-masterless/provisioner.go:121: arg err for printf verb %d of wrong type: error
provisioner/salt-masterless/provisioner.go:142: arg err for printf verb %d of wrong type: error
provisioner/salt-masterless/provisioner.go:157: arg err for printf verb %d of wrong type: error
provisioner/salt-masterless/provisioner.go:172: arg err for printf verb %d of wrong type: error
provisioner/salt-masterless/provisioner.go:216: arg err for printf verb %d of wrong type: error
2015-02-25 05:43:18 +01:00
Emil Hessman
92704b693a
provisioner/puppet-masterless: fix missing format argument
...
Fixes the following vet report:
provisioner/puppet-masterless/provisioner.go:196: missing argument for Errorf(%d): format reads arg 1, have only 0 args
2015-02-25 05:43:18 +01:00
David Danzilio
7e3d172581
Fixing spacing on line 162 and 164 of provisioner/puppet-masterless/provisioner_test.go
2015-02-24 22:56:37 -05:00
David Danzilio
8404f6ce86
Taking a stab at a test for the facter facts
2015-02-24 22:52:09 -05:00
David Danzilio
d1445bc6fe
Make PackerBuildName and PackerBuilderType available as Facts during a masterless run similar to the way we do with the Shell provisioner.
2015-02-24 21:44:00 -05:00
Colin Hebert
b7fccec91c
Set the working dir to staging dir
2015-01-11 10:29:01 +11:00
Colin Hebert
a100e9393b
Add support for custom working directory for puppet
2015-01-11 10:25:48 +11:00
Erik Simmler
034ed36d0e
Ask salt to return a proper exit code so we can fail the builder appropriately.
2014-12-30 10:34:43 -05:00
Neeki Patel
3a3a81b01c
Merge remote-tracking branch 'upstream/master'
2014-12-24 17:04:27 -05:00
Victor Trac
eb72584415
fix passing bootstrap_args to bootstrap script
2014-12-22 14:08:32 -06:00
Neeki Patel
027b43ea05
Fixed info declared and not used
2014-12-16 09:49:57 -05:00
Neeki Patel
5a9e5df967
Allow manifest_file to be a directory
...
Puppet is removing support for imports and node inherits. This change will support directories as manifests
https://docs.puppetlabs.com/puppet/latest/reference/dirs_manifest.html
https://docs.puppetlabs.com/puppet/latest/reference/lang_import.html
2014-12-16 09:27:30 -05:00
Timur Batyrshin
e4c544b3e2
added ssl_verify_mode parameter to chef-client provisioner
2014-12-05 20:26:41 +03:00
James Massara
1837c7189a
Added tests for prevent_sudo
2014-11-27 06:24:54 -08:00
James Massara
a5ca2e5a27
Use sudo only if prevent_sudo is not set
2014-11-27 06:24:54 -08:00
Seth Vargo
0eb634ae6a
Merge pull request #1525 from scott2449/master
...
Add default nodename for chef-client
2014-11-26 16:29:22 -05:00
Nathan Hartwell
e5c6f1a753
Merge branch 'master' of https://github.com/mitchellh/packer
...
Conflicts:
provisioner/salt-masterless/provisioner.go
2014-11-05 10:58:25 -06:00
Mitchell Hashimoto
81d8cd0db4
Merge pull request #1394 from mafrosis/salt-masterless
...
Salt masterless tidy up
2014-10-28 08:35:10 -07:00
Mitchell Hashimoto
3eda0f33a0
provisioner/shell: quote PACKER env vars [GH-1565]
2014-10-28 08:23:18 -07:00
Mitchell Hashimoto
8cdb686505
Merge pull request #1562 from bhcleek/ansible-local-inventory-best-practice
...
provisioners/ansible-local: always use an inventory file
2014-10-27 17:01:12 -07:00
Steve Daniels
86fb46ab0a
Update SaltStack provision to https
...
This changes the SaltStack bootstrap URL to use the HTTPS link from the commercial site. Alternatives are the HTTPS link to the raw file on GitHub, but this, whilst more transparent, might break down the line.
2014-10-22 17:55:45 +01:00
Billie H. Cleek
afa499befd
always use an inventory file
...
Using "127.0.0.1," as the argument to `ansible-playbook -i` uses an
undocumented feature of Ansible. Michael DeHaan has indicated that
support for it may be pulled in the future
(https://groups.google.com/forum/#!topic/ansible-project/G_9JRGp5jGE ).
2014-10-14 15:36:29 -07:00
Mitchell Hashimoto
373cefa93c
Merge pull request #1585 from Tpbrown/ansible-color-and-unbuffered
...
provisioner/ansible: Colorize Ansible output, and don't buffer output.
2014-10-14 15:36:27 -07:00
Josh Frye
5835ca42b4
Move quoting to else block only for valid vars. Add test case.
2014-10-14 14:20:36 -07:00
Josh Frye
a667282e00
Single quote env var values.
2014-10-14 13:03:14 -07:00
Tim Brown
baa8697f5d
Colorize Ansible output, and don't buffer output.
...
Setting environment variables for the ansible-playbook invocation.
ANSIBLE_FORCE_COLOR will ensure output is colorized. PYTHONUNBUFFERED will stream output as Ansible runs, vs getting a big dump of output at the end.
2014-10-13 15:31:11 -07:00
Nathan Hartwell
331003c809
Merge branch 'master' of https://github.com/mitchellh/packer
2014-10-06 15:19:11 -05:00
mafro
ed07fb63e4
salt provisioner: tidy up and refactor into functions
2014-10-01 12:31:58 +10:00
mafro
e7a46d97c0
salt provisioner: require local_state_tree
2014-10-01 12:31:58 +10:00
Scott Rahner
4383b435a4
adding default nodename
2014-09-24 19:40:34 -04:00
Mitchell Hashimoto
75395af12d
Merge branch '1064-fix-upload-file-permissions' of github.com:rasa/packer into rasa-1064-fix-upload-file-permissions
...
Conflicts:
builder/parallels/common/step_upload_parallels_tools.go
builder/vmware/common/step_upload_tools.go
provisioner/chef-client/provisioner.go
provisioner/chef-solo/provisioner.go
2014-09-08 13:20:46 -07:00
Mitchell Hashimoto
802168f4b5
Merge branch 'add-chef-environment' of github.com:cfortier2/packer into cfortier2-add-chef-environment
...
Conflicts:
provisioner/chef-client/provisioner.go
2014-09-05 16:13:32 -07:00
Mitchell Hashimoto
825864a9ea
Merge branch 'additional-user-variables' of github.com:nBerg/packer into nBerg-additional-user-variables
...
Conflicts:
builder/amazon/common/run_config.go
2014-09-02 09:57:52 -07:00
yveslaroche
3bfeb54853
Fix Ansible inventory path on Windows
...
Convert the path to use a '/' separator.
2014-07-25 14:32:38 +01:00
Misha Brukman
c75a671c1e
Cleaned up Go formatting with gofmt.
2014-07-17 15:33:09 -04:00
sawanoboly
18dddb516b
Fix remotePaths when provisioning Linux from Windows
2014-07-11 19:12:34 +09:00
Nina Berg
bd1a0d07fb
Added some variables to amazon-ebs builder and chef-client provisioner
2014-07-08 13:15:17 -04:00
cfortier2
e908cc1733
add chef_environment test
2014-05-21 09:30:18 -04:00
cfortier2
25386f8e8e
add support for chef_environment
2014-05-21 09:24:34 -04:00
Ross Smith II
d92179847d
provisioner/file: set file/directory permissions
...
fixes #1064
2014-05-09 21:03:35 -07:00
renat-sabitov-sirca
0a8e4c7186
Uploading the whole ansible playbook directory
2014-05-10 01:59:05 +10:00
Nathan Hartwell
88ec874c32
Adding disable_sudo support to salt-masterless provisioner
...
This is already present in some other provisioners and is helpful when
using a builder that gives you root access.
2014-05-09 09:08:41 -05:00
Mitchell Hashimoto
5c5d62733f
fmt
2014-05-01 14:24:19 -07:00
Mitchell Hashimoto
9beac8d286
provisioner/chef-client: proper ordering of args [GH-1100]
2014-05-01 14:13:22 -07:00
Ben Langfeld
b801713e83
Node DNA needs to handle multiple types
...
Makes chef-client provisioner consistent with chef-solo in its handling of nested JSON as well as strings.
Fixes #1096
2014-05-01 12:48:45 -03:00
Mitchell Hashimoto
bb8d0a5e7a
provisioner/chef-solo: convert []uint8 to string
2014-04-29 00:33:55 -07:00
Mitchell Hashimoto
379f3ae933
provisioner/chef-solo: be more lenient on json fix
2014-04-28 22:20:57 -07:00
Mitchell Hashimoto
4379997c2c
provisioner/chef-solo: better error for bad type in JSON
2014-04-28 22:18:21 -07:00
Mitchell Hashimoto
8fc46aaa82
provisioner/chef-solo: deeploy nested JSON works properly
2014-04-28 21:56:32 -07:00
James Cline
6017f895f1
provisioners/chef-client: delete correct client
...
The server URL was being passed through rather than the client name.
2014-04-28 15:29:15 -07:00
Mitchell Hashimoto
9365b879c0
provisioner/shell: chmod uploaded file to 0777 [GH-994]
2014-04-26 20:20:47 -07:00
Mitchell Hashimoto
ec41edf558
provisioner/shell: Split on first equal for env vars [GH-1045]
2014-04-26 14:51:56 -07:00
Mitchell Hashimoto
5fac6c79c4
fmt
2014-04-26 11:12:43 -07:00
James Cline
eb4ba76e1a
provisioner/chef-client: validation_client_name
...
Allows setting of validation_client_name from packer template json.
2014-04-24 00:09:30 -07:00
Ross Smith II
ec847acf80
Merge pull request #963 from rhburrows/ansible-local-paths-on-windows
...
Fix ansible paths when provisioning Linux from Windows
2014-04-21 08:21:08 -07:00
Ross Smith II
4f186fbd6e
Merge pull request #1006 from jgornick/add-ansible-inventory-file (manually)
2014-04-21 07:57:24 -07:00
Joe Gornick
d9fc06a170
Update Ansible provisioner to set cwd to staging directory.
2014-04-08 09:50:26 -05:00
Joe Gornick
6d56def162
Add inventory_file option to Ansible provisioner.
2014-04-04 14:58:48 -05:00
Ryan Burrows
6420fbb469
Fix ansible paths when provisioning Linux from Windows
...
Since the paths are generated on the host machine but the commands are
executed on the VM being provisioned the paths generated will use path
separators from the host. In the case of provisioning a Linux VM from
Windows this path will not work.
Convert the path to use a '/' separator which should work for both
platforms in Go
2014-03-18 11:12:13 -07:00
Mitchell Hashimoto
3de16f20b9
privisioner/chef-client: don't chown with ubuntu [GH-939]
2014-03-12 21:05:25 -07:00
Mitchell Hashimoto
ab97545a52
provisioner/puppet-server: docs
2014-02-24 09:51:48 -08:00
Mitchell Hashimoto
2af91addf9
Merge pull request #796 from Jimdo/puppet-server
...
Add puppet server provisioner
2014-02-24 09:49:27 -08:00
Mitchell Hashimoto
000e5b67ff
provisioner/chef-client: docs and validation key path
2014-02-24 09:45:04 -08:00
Mitchell Hashimoto
d7e6409b9a
provisioner/chef-client: clean up
2014-02-24 08:53:56 -08:00
Mitchell Hashimoto
d0a08e83cf
Merge pull request #855 from Elachance/chef-client-provisioner
...
adding chef-client provisioner
2014-02-24 08:33:11 -08:00
Mitchell Hashimoto
4576093c17
fmt
2014-02-24 08:26:51 -08:00
Mitchell Hashimoto
8c1de9e712
provisioner/ansible-local: better error if missing [GH-836]
2014-02-21 20:30:04 -08:00