Commit Graph

58 Commits

Author SHA1 Message Date
Chris Roberts c56acfab94 Add WinSSH communicator 2017-04-15 07:12:58 -07:00
Chris Roberts da45ca707c Add md5 and sha1 checksum support to Downloader.
Allows checksum validation on downloaded files via Util::Downloader
using MD5 and/or SHA1 checksums. This also integrates checksum validation
support with the shell provisioner for downloaded remote files.
2016-11-09 16:05:39 -08:00
Seth Vargo 9de5126143 Convert env values to strings before escaping 2015-12-22 14:23:56 -05:00
Seth Vargo 930e166b47 Add :env option to shell provisioner 2015-11-23 19:29:35 -05:00
Mitchell Hashimoto e6098f6c4f rename to powershell_elevated_interactive 2015-11-18 12:51:18 -08:00
Mitchell Hashimoto dde21bc95a fix file permissions 2015-11-18 12:48:41 -08:00
Marc Siegfriedt 8e87990599 add the option to make elevated interactive scripts 2015-10-15 12:25:50 -07:00
Sam Phippen 53714abfa3 Handle encoding errors in shell provisioner newline normalization.
The problem demonstrated in #6065 is that a string has incorrectly been
encoded with US-ASCII even though it contains invalid US-ASCII byte
sequences (any byte with the most significant bit on is invalid in the
US-ASCII encoding).

The thing about doing newline normalization is that it is not actually
sensitive to the presence of US-ASCII byte sequenzes. Additionally, it
is very unlikely that a user will ever be using an encoding where \r\n
is not encoded the same as it would be in ASCII.

This patch first tries the existing method of normalizing the newlines
in the provided script file, if that fails for any reason it force
encodes the string to ASCII-8BIT (which allows the most significant bit
to be on in any individual byte) and then performs the substitution in
that byte space.
2015-09-12 14:36:54 +01:00
Seth Vargo 50c0c487fb Style cleanup for new name option 2015-05-30 20:57:49 -07:00
James Shubin b16b85aa7d Add :name attribute to shell provisioner.
This allows the display of friendly output to the user when we think an
important action should be labeled a certain way. This makes vagrant
output a lot more useful when many inline shell provisioners are
present.
2015-04-18 00:35:21 -04:00
Mitchell Hashimoto da91741b7c provisioners/shell: fix typo 2014-10-23 22:49:26 -07:00
Mitchell Hashimoto a7d3458abc provisioners/shell: retry getting SSH info a few times [GH-3924] 2014-10-23 22:48:48 -07:00
Mitchell Hashimoto 3f01a99148 provisioners/shell: rename shell_args to powershell-args 2014-10-23 09:53:14 -07:00
Eris Belew 7a73f5bd7c Update shell provisioner for powershell to add "shell_args", saner defaults and more useful detail in logging output; Add Eclipse .project file to .gitignore IDE section 2014-09-23 12:46:25 -07:00
Matthijs van der Vleuten 1091b4cb54 Don't output stdout and stderr twice when shell provisioner fails
[GH-4086]
2014-06-23 11:35:40 +02:00
Kalman Hazins bb052366f7 Change symbols inside hashes to 1.9 JSON-like syntax 2014-05-22 12:35:12 -04:00
Fabio Rehm 1eec62cb9e provisioners/shell: Fix shell provisioning when config.binary is set to false [GH-3712]
The `config` in use was the Shell provisioner config that does not expose
access to the VM configs.

References https://github.com/fgrehm/vagrant-lxc/issues/284
2014-05-08 18:55:07 -03:00
Shawn Neal cc905d7923 Fix remote/downloaded shell scripts
The temporary shell script that we downloaded the script too was being deleted twice, thus causing an error on the secondary delete.
2014-04-30 19:39:37 -07:00
Shawn Neal 392269a8eb Default the WinRM shell provisioner to privileged (elevated) 2014-04-30 19:35:02 -07:00
Mitchell Hashimoto 1c7faae1ee provisioners/*: prefix the output 2014-04-21 13:56:19 -07:00
Mitchell Hashimoto bec2cbbf4d provisioners/shell: check for winrm should be on machine config 2014-04-21 13:53:56 -07:00
Mitchell Hashimoto 4145aa6bcd privisioners/shell: wait for reboot if we can 2014-04-21 13:53:54 -07:00
Mitchell Hashimoto 4fc6fbeef6 privisioners/shell: fix syntax error 2014-04-21 13:53:53 -07:00
Mitchell Hashimoto 286fd2f2f8 provisioners/shell: friendly output if winrm shell provisioning 2014-04-21 13:53:52 -07:00
Mitchell Hashimoto bddc7928ad provisioner/shell: proper extension on temporary file 2014-04-21 13:53:50 -07:00
Mitchell Hashimoto 89671974cf provisioners/shell: handle comm output in a uniform way 2014-04-21 13:53:49 -07:00
Mitchell Hashimoto cde5d0bafb privisioners/shell: execute windows script 2014-04-21 13:53:48 -07:00
Mitchell Hashimoto aca8c4f8f3 provisioners/shelL: don't replace windows lineendings for WinRM 2014-04-21 13:53:47 -07:00
Mitchell Hashimoto 15fe061004 provisioners/shell: cause provision_winrm if winrm 2014-04-21 13:53:46 -07:00
Mitchell Hashimoto fa537740c6 provisioners/shell: use detail level output for running 2014-03-08 14:43:35 -08:00
Mitchell Hashimoto 8c9fde41e9 provisioners/shell: clean up fixnum handling 2014-02-14 12:43:27 -08:00
Ryan Uber 509e29043a Added handling of fixnum values for shell provisioner options both as the value
of `args` itself and as an element inside of an `args` array. Added validation
around passing in arrays for arguments. Just knowing that it is an array is not
enough, because arrays can contain any other type.
2014-02-14 11:47:36 -08:00
Mitchell Hashimoto 38f931ba93 provisioners/shell: array args properly work 2013-12-06 11:28:32 -08:00
Mitchell Hashimoto 57d4775140 provisioners/shell: allow array args [GH-1949] 2013-11-25 13:36:51 -08:00
Mitchell Hashimoto 741930b439 Merge pull request #1949 from mpapis/feature/shell_provisoner_array_args
provisioners/shell: implement array arguments from #1569
2013-11-25 13:31:48 -08:00
Mitchell Hashimoto b65b22cef2 update changelog 2013-11-23 16:05:44 -08:00
jaugustin 722e9e6afb [Provisioner][Shell] add keep_color option to allow custom color output 2013-11-16 13:34:58 +01:00
Mitchell Hashimoto 8c4ea4f47b Update CHANGELOG 2013-09-20 17:24:59 -07:00
Alexander Norström b20fe8d41e Dont replace Windows newlines to Unix if shell is set as binary 2013-09-19 13:33:58 +02:00
Fabio Rehm 47594036b4 Add support for remote shell provisioner script 2013-08-29 20:44:14 -03:00
Mitchell Hashimoto 349b2507f9 Merge branch 'unpriv_shell' of https://github.com/frsantos/vagrant into frsantos-unpriv_shell
Conflicts:
	plugins/provisioners/shell/config.rb
	plugins/provisioners/shell/provisioner.rb
2013-08-28 22:29:49 -07:00
Mitchell Hashimoto 8379d0e20e Don't forcibly output newlines for provisioners 2013-07-19 23:38:25 -04:00
Michal Papis fb96396f65 implemetn array arguments from #1569 2013-07-19 03:35:37 +02:00
Mitchell Hashimoto 40e9ce6252 Convert DOS line endings to Unix in shell provisioner [GH-1495] 2013-04-22 23:32:13 -07:00
Shawn Dahlen 8afd3f105c Fix use of config.ssh.username and reset provisioning path permissions.
This commit contains two fixes:

- The Chef provisioner was incorrectly referencing config.ssh.username
  instead of machine.ssh_info[:username]. With the new change to default
  ssh configuration, if a user had not set config.ssh.username,
  provisioning would fail.

- The shell provisioner was not appropriately changing permissions to
  the upload path. If a different ssh user attempted to use a shell
  provisioner, provisioning would fail. The same case applied to
  the Chef provisioner -- while permissions were being reset, they
  were not done recursively.
2013-04-11 08:05:50 -04:00
Mitchell Hashimoto 6b3e028166 Output shell script that is running [GH-1568] 2013-04-10 11:27:45 -07:00
Francisco R. Santos 4a6e7c756b Allow non privileged user vagrant to run a shell provision 2013-02-11 19:42:36 +01:00
Mitchell Hashimoto 2b4920b4b6 Close the tempfile for shell provisioner [GH-1040] 2013-02-07 15:23:18 -08:00
Mitchell Hashimoto c8053c00a4 New provisioner API. Shell provisioner adheres to it. 2013-01-13 15:48:52 -08:00
Mitchell Hashimoto 2de124e296 Turn provisioners to V2 2012-11-06 21:21:36 -08:00