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
sophia
132720e3b4
Add local machine to global index of machines if it does not exist
2020-06-09 17:22:55 -05:00
sophia
66a3b58c08
Add provider capaiblity :has_communicator
2020-06-09 09:33:11 -05:00
sophia
36a086a4d1
Validate netmask value from VirtualBox
2020-06-08 12:21:29 -05: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
Jeff Bonhag
a8de98f97a
Default #in_installer? to false
...
This ensures that these tests will pass if the environment has
`VAGRANT_INSTALLER_ENV=1` set (e.g. in a local development environment).
2020-06-03 11:42:57 -04:00
Robin Munn
453e957158
Fix typo
2020-06-01 09:04:22 +07:00
Jeff Bonhag
73130e3ff6
Switch to Vagrant::Util methods
2020-05-29 15:51:24 -04:00
sophia
1a758d839b
Option to gracefully destroy vm
2020-05-29 15:36:40 -04:00
sophia
672859e296
Add tests and docs
2020-05-29 15:34:46 -04:00
Jeff Bonhag
e7d48b0b93
Remove test double
...
We don't actually need a test double here because `#ipv4_loopback?`
will return true for any address in the `127.0.0.0/8` space.
2020-05-29 15:30:38 -04:00
Jeff Bonhag
270462fc89
Fix #11640 : Check port of loopback address
...
If the given host_ip is a loopback address, proceed with the regular
port check.
2020-05-29 15:30:21 -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
043008a3c4
Raise error if trying to install unsupported shell
2020-05-29 15:10:13 -04:00
sophia
5c6c748dc2
Mock out file
2020-05-29 15:10:13 -04:00
sophia
9e2b7fb690
Autocomplete command
2020-05-29 15:10:13 -04:00
sophia
a59eedb748
Rework install shell config classes
2020-05-29 15:10:13 -04:00
sophia
d6175e0c66
Give feedback to user about which files have been modified for autocopmletion to be enabled
2020-05-29 15:10:13 -04:00
sophia
89503d9a66
Install zsh autocomplete
2020-05-29 15:10:13 -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
a8c9d6c3d3
Fix tests
2020-05-29 10:27:42 -04:00
sophia
fb2470f48d
Ensure shell provisioner gets extension specified in path config if exists
2020-05-26 16:35:31 -04:00
Brian Cain
f22feac515
Use example domain in downloader tests
2020-05-21 07:59:02 -07:00
Brian Cain
cff0ef9830
Update to use example domain
...
This commit updates the example output to use example.com, rather than a
potnetially real domain.
2020-05-20 14:56:02 -07:00
sophia
f5d5baec40
Set hostname according to hostname flag and ip for suse
2020-05-15 13:30:23 -04:00
Brian Cain
5aff6660fb
Move port checker method to class rather than instance
...
This commit also moves out the ipv4_interfaces method to be a util
method, so that the port checker can also access it as a class mehtod
2020-05-12 10:54:23 -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
Brian Cain
3934a26c29
Fixes #11606 : Mock out guest capabilities instead of running them
...
This commit fixes a test that only fails on certain users machines where
Vagrant ends up trying to run real guest capabilities to test if the
docker provisioner raises an error if the provisioner install failed. It
fixes it by mocking out the expected return values for those
capabilities rather than relying on them actually running for this
specific unit test.
2020-05-11 08:01:29 -07:00
Sophia Castellarin
238f5469b5
Merge pull request #11584 from soapy1/podman-install
...
Seperate podman centos and rhel install
2020-05-07 11:57:51 -04:00
sophia
7ffe2d92e9
Add test for installing
2020-05-07 11:39:08 -04:00
Chris Roberts
5195bee9ea
Check if plugin install provides specification
...
During a plugin install, if the plugin is already installed and
activated, no specification will be returned as there was nothing
new installed. In this situation, look for the requested plugin
within the activated specifications. If it is found, then proceed
since the plugin is installed. If it is not found, return an error.
2020-05-06 15:51:37 -07:00
sophia
5124ec1cf9
Test docker installer and ensure that all caps are valid
2020-05-06 15:02:15 -04:00
Chris Roberts
f5b75ed0d6
Update IO util to properly handle unknown conversion errors
...
When converting encoding to UTF-8 on Windows, allow for unknown
conversions to be properly handled and prevent generating an
error.
2020-05-04 13:25:53 -07: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
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
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