Jeff Bonhag
9af48e5764
Raise an error on nil exit status
...
This commit changes the SSH communicator to raise an error if Vagrant
doesn't receive an exit status from an SSH command, for example if the
command is terminated by the OOM-killer.
2020-06-26 13:25:59 -04:00
Chris Roberts
c9a65ac75b
Merge pull request #11688 from chrisroberts/f-trigger-all
...
Fix trigger matching on `:all` special value
2020-06-15 14:15:26 -07:00
Sophia Castellarin
d9bbdab428
Merge pull request #11567 from soapy1/suse-hosts-mod
...
Set hostname according to hostname flag and ip for suse
2020-06-15 14:29:43 -05:00
Sophia Castellarin
a2b70bc28a
Merge pull request #11566 from soapy1/network-hostname-flag
...
Add :hostname option to network config
2020-06-12 16:51:31 -05:00
Sophia Castellarin
7dfb71c471
Merge pull request #11565 from soapy1/disable-host-modification
...
Add option to disable modification of /etc/hosts on guest
2020-06-12 16:30:49 -05:00
Sophia Castellarin
111f58ef38
Merge pull request #11628 from soapy1/vagrant-destroy-power-off
...
Option to forcefully/gracefully destroy virtualbox vm
2020-06-12 15:00:01 -05:00
sophia
b02a78c661
Change config option to allow_hosts_modification
2020-06-12 14:50:07 -05:00
sophia
7265dd2a84
Add :hostname option to network config
...
* hostname is a boolean
* a network that sets hostname should have a static ip address
* only one network may set hostname
can be set at `config.vm.network :public_network, hostname: true, ip: "192.168.0.1"`
2020-06-12 14:44:35 -05:00
sophia
ff0aea4493
Add option to disable modification of /etc/hosts on guest
2020-06-12 14:25:19 -05:00
Sophia Castellarin
13f50ca840
Merge pull request #11644 from soapy1/shell-provisioner-bat
...
Shell provisioner gets extension specified in path config if exists
2020-06-12 14:16:40 -05:00
Sophia Castellarin
4704606056
Merge pull request #11570 from soapy1/mount-shared-folders
...
Automatically mount virtual box shared folder when machine reboots
2020-06-12 14:11:21 -05:00
Brian Cain
7b95826dd7
Add type as param for cloud_init config
2020-06-10 15:38:18 -07:00
Chris Roberts
916655dbd3
Fix trigger matching on :all special value
...
Updates the type to do a proper comparison when checking for
the `:all` special value as well as applied ignores.
Fixes #11599
2020-06-09 16:12:48 -07:00
Brian Cain
492a532ef5
Remove freezing symbols in disk/trigger conig
2020-06-08 15:02:44 -07:00
Brian Cain
aeeb5dfc6f
Introduce cloud_init config for Vagrant
...
This commit adds the basic config class for defining cloud_init for a
given guest
2020-06-05 10:38:24 -07:00
sophia
1a758d839b
Option to gracefully destroy vm
2020-05-29 15:36:40 -04:00
sophia
fe7968315b
Add option to allow/disable fstab modification
...
Defaults to allow modification of fstab
2020-05-29 15:29:21 -04:00
sophia
1dc761a6c4
Refactor out persisting a mount to it's own guest cap
2020-05-29 15:26:48 -04:00
sophia
d7bd29384e
Remove fstab if it is unable to successfully mount
2020-05-29 15:26:48 -04:00
sophia
b511d23ae1
Refresh fstab when folders synced
2020-05-29 15:26:48 -04:00
sophia
298027b70e
Automatically mount virtual box shared folder when machine reboots
...
This is done by adding the mount to fstab
ref: https://askubuntu.com/questions/252853/how-to-mount-a-virtualbox-shared-folder-at-startup
Note, add `nofail` to mount options so as to not stop machine from booting if device disappears
2020-05-29 15:26:48 -04:00
sophia
85fd3b79fe
Refactor editin guest /etc/hosts into a util
2020-05-29 15:08:39 -04:00
Brian Cain
fab786cc28
Merge pull request #11602 from briancain/feature/docker-port-collision-fix
...
Fixes #9067 : Ensure new containers don't grab existing bound ports
2020-05-29 08:37:23 -07:00
sophia
fb2470f48d
Ensure shell provisioner gets extension specified in path config if exists
2020-05-26 16:35:31 -04:00
Brian Cain
bd4181eb15
Remove whitespace
2020-05-20 10:44:14 -07:00
Brian Cain
1e1d65f81c
Ensure MapCommandOptions util is required prior to use
2020-05-20 10:43:39 -07:00
sophia
fc79aa96dd
Search for first free loopback address to insert hostname
2020-05-15 14:24:04 -04:00
sophia
f5d5baec40
Set hostname according to hostname flag and ip for suse
2020-05-15 13:30:23 -04:00
Sophia Castellarin
5e4373998c
Merge pull request #11587 from rgl/feature-esxi-guest-only-create-ssh-directory-when-needed
...
esxi guest: only create the ssh directory when needed
2020-05-12 15:28:21 -04:00
Brian Cain
cfb9a6457e
Remove obtaining name from docker container info
2020-05-12 11:26:48 -07:00
Brian Cain
c18ceb20bc
Define custom port_check method for halted docker containers
2020-05-12 11:17:15 -07:00
Brian Cain
b2d9abe344
Fixes #9067 : Ensure new containers don't grab existing bound ports
...
Prior to this commit, if a created but exited container bound a port,
and a new container grabed that same port (say for an ssh port forward),
when the initial container came back up it would fail because the port
also got bound to the second container. This commit fixes that behavior
by first looking at what containers are already bound prior to creating
a container.
2020-05-11 10:17:22 -07:00
Rui Lopes
6719cab41a
esxi guest: do not fail when we cannot set the ssh directory permissions in esxi 7.0
2020-05-08 20:20:03 +01:00
sophia
725a127467
Seperate podman centos and rhel install
2020-05-06 15:33:44 -04:00
codylane
2a90c1b4fd
fixes GH issue #11580
2020-05-05 11:48:14 -06:00
Sophia Castellarin
85fc3a99b5
Merge pull request #11560 from soapy1/box-download-ssh-settings
...
Add option `box_download_options`
2020-04-30 10:03:23 -04:00
sophia
646de433a9
Validate conversion of map to cmd options
2020-04-29 15:10:48 -04:00
sophia
7e125969dd
Add option box_download_options
...
Allow users to specify a map of extra options to pass to the downloader.
These options will be passed to curl, with a `--` appended to the key
2020-04-29 15:10:44 -04:00
Sophia Castellarin
56bc93e154
Merge pull request #11540 from soapy1/winrm-config-docs
...
Update winrm config docs
2020-04-29 09:57:23 -04:00
sophia
13bb29af2b
Don't warn on ansible compatability mode
2020-04-28 10:48:25 -04:00
Jeff Bonhag
2c4a40fccb
Fix issues with shell provisioner when WinSSH shell is set to cmd ( #11547 )
...
This commit fixes a couple of issues with the shell provisioner when the
WinSSH shell is set to cmd:
- A check for the .bat extension returned by File.extname
- Execute inline scripts with PowerShell when upload_path ends with .ps1
* Ensure script has correct extension
Co-Authored-By: Sophia Castellarin <sophia@hashicorp.com>
2020-04-24 15:56:27 -04:00
sophia
b4e13bf1ce
Update winrm config docs
2020-04-23 09:47:16 -04:00
Chris Roberts
720c3012ce
Use #systemd_networkd? guest check for renderer
2020-04-22 15:07:14 -07:00
Chris Roberts
4546d804b1
Add support for configuring SSH connect timeout
...
Retains the original default value of 15 seconds for SSH connect
timeout. Allows users to modify this timeout via SSH communicator
option. Enforces integer values for timeout and validates custom
values are greater than 0.
2020-04-20 14:23:21 -07:00
Jeff Bonhag
f593bb54d2
Fix #8704 : Raise an error if the guest IP ends with .1 ( #11500 )
...
If the VirtualBox guest property /VirtualBox/GuestInfo/Net/1/V4/IP
returns an IP address ending in .1, raise an error.
This addresses an issue that was revealed as an NFS error, where Vagrant
was creating an exports file with the wrong IP address. This was thought
to be caused by the presence of a docker0 interface, but it manifested
itself even without Docker installed.
This issue is difficult to reproduce, but hopefully this PR will get us
closer to the root cause.
2020-04-20 13:28:37 -04:00
Sophia Castellarin
c89b68b06d
Merge pull request #11517 from soapy1/win-shell-provisioner-fail
...
Ensure windows files get an extension
2020-04-20 12:38:06 -04:00
Sophia Castellarin
bc4368f739
Merge pull request #11503 from soapy1/smb-symlinks
...
Smb symlinks
2020-04-20 12:35:38 -04:00
sophia
4d516e2cae
Test provision_winssh
2020-04-17 13:11:57 -04:00
Chris Roberts
c0f8a54924
Merge pull request #11436 from hvnsweeting/patch-1
...
Allow to specify python_version
2020-04-17 08:55:20 -07:00
sophia
2ddd12047c
Ensure windows files get an extension
2020-04-17 10:31:24 -04:00