Commit graph

41 commits

Author SHA1 Message Date
oss-core-libraries-dashboard[bot]
1a8c7eb042
[COMPLIANCE] Update Copyright and License Headers (Batch 4 of 7) (#13762)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2025-12-22 16:46:54 +05:30
Chris Roberts
ea25996b21
Update Vagrant behavior outside of installers
Remove customized require behaviors and modify the bin executable
to check for missing tools that Vagrant expects to exist when
running outside of an installer.
2025-04-02 11:40:17 -07:00
Chris Roberts
8b06640fcf
Use helper for require calls 2024-11-06 17:33:00 -08:00
hashicorp-copywrite[bot]
36a312ee26
add missing license headers and update copyright file headers to BUS-1.1 2023-08-10 21:53:25 +01:00
Jeff Bonhag
df7c11a3a7 Fix issues with Windows SSH provisioner
Windows commands that run over SSH are wrapped in a script that writes a
special marker to the two output streams (stdout and stderr).  This
allows Vagrant to consume the output streams.

Unfortunately, this leads to a sort of chicken-and-egg problem where no
commands can be run before a wrapper script exists. For example, you
can't make a destination directory to upload the wrapper script without
first creating a wrapper script to make the directory. :)

This commit changes the behavior of the WinSSH communicator to assume
that the destination directory already exists for provisioning scripts.

It also moves the default `upload_path` from the shell provisioner
config so we can have OS-specific defaults.

Finally, it introduces a Windows-specific #upload method which will
properly use a Windows path separator on a non-Windows host.
2020-03-04 15:08:03 -08:00
Chris Roberts
7fb81bcea1 Add support for other checksum types 2019-10-08 11:23:48 -07:00
Chris Roberts
e735453422 Add reboot option to shell provisioner
Adds a `reboot` option which allows the guest to be rebooted after
the completion of a shell provisioning task. The guest must support
the `:reboot` capability. Like the `reset` option, the `reboot`
option may be provided without defining `inline` or `file` options
when a reboot may be required between other provisioners.

Fixes #8639
2018-12-21 15:50:59 -08:00
Chris Roberts
29880ccd1f Add option to shell provisioner to reset communicator 2018-11-12 15:36:21 -08:00
Chris Roberts
3664f1a627 Allow hiding environment variable values in shell provisioner 2018-01-12 17:33:47 -08:00
Vít Ondruch
7187e6f909 Use Integer instead of Fixnum for Ruby 2.4+ compatibility. 2017-10-23 10:57:36 -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
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
Dan Dunckel
9d87be51da Small refactor on conditional check and add tests 2015-10-15 12:25:50 -07:00
Marc Siegfriedt
8e87990599 add the option to make elevated interactive scripts 2015-10-15 12:25:50 -07: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
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
Ben Dean
dbb92ae412 change the shell provision config to make all the args strings
specifically arrays could contain `Fixnum` args and those wouldn't get turned into strings.
2014-07-22 15:41:01 -04:00
Kalman Hazins
bb052366f7 Change symbols inside hashes to 1.9 JSON-like syntax 2014-05-22 12:35:12 -04:00
Mitchell Hashimoto
e5d1d681d9 Update CHANGELOG 2014-04-09 14:17:51 -07:00
Bernhard Morgenstern
247a2470c0 Fixed error with empty shell provisioner
`read` returns nil on empty files, so the call to `valid_encoding` fails.
2014-04-09 22:56:15 +02:00
Mitchell Hashimoto
a667893cbf provisioners/shell: error if invalid encoding [GH-3000] 2014-02-23 21:50:53 -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
cfb258a55b provisioners/shell: s/unless/if !/ 2013-11-29 00:02:20 -08:00
Paul Hinze
fef60242b0 provisioners/shell: fix validation for args [GH-1949]
The logic change in 57d4775140 introduced
a bug where neither strings nor arrays provided as `args` for shell
provisioners would pass validation.

This fixes that problem along with a few extras:

- split out arg validation into a private method
- update comment describing valid args
- add a few unit tests around config validation
2013-11-28 19:54:10 -06:00
Mitchell Hashimoto
57d4775140 provisioners/shell: allow array args [GH-1949] 2013-11-25 13:36:51 -08:00
jaugustin
722e9e6afb [Provisioner][Shell] add keep_color option to allow custom color output 2013-11-16 13:34:58 +01: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
Mitchell Hashimoto
3154669835 provisioners/shell: prefer "." over "::"
/cc @fgrehm
2013-09-03 10:44:16 -07: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
4ffc2c3b74 Invalid configuration keys are caught and shown in user friendly way
[GH-1484]
2013-04-03 16:18:37 -07:00
Eivind Uggedal
41de457889 Use UNSET_VALUE for @args in shell config since [] is truthy. 2013-03-18 12:44:26 +01:00
Mitchell Hashimoto
2210765412 Fix default values for shell provisioner config 2013-03-17 16:18:49 -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
5e42a99ab6 Update shell provisioner to latest validation api 2013-01-18 13:06:29 -08:00
Mitchell Hashimoto
c8053c00a4 New provisioner API. Shell provisioner adheres to it. 2013-01-13 15:48:52 -08:00