Commit Graph

4147 Commits

Author SHA1 Message Date
Brian Cain 711270b90a
Fixes #11287: Set top level provisioner name if set in provisioner
config

Prior to this commit, if a user had configured a provisioner that had a
config with a `name` option, it would not properly set the top level
provisioner classes name config option which would lead to some
understanibly confusing results when trying to `--provision-with`. This
commit fixes that by checking to see if the top level name isn't set,
look to see if that provisioners config defines a name, and use that
instead.
2020-01-06 11:10:28 -08:00
Chris Roberts 25659a6f6b Support properly setting up synced folders on Catalina
Since the root file system is marked as read-only, attempting to
link the shared directory to `/vagrant` will fail. If the guest
path is on the root file system and APFS is used, create the
link as a firmlink instead.
2019-12-18 13:11:30 -08:00
Jose Luis Duran 582f46231b
FreeBSD: Update Ansible's package name
The Ansible package in FreeBSD is now `py36-ansible`.

If `pkg` itself needs updating, passing only one 'yes' is not enough to
confirm the installation of the package.  Use the `-y` option,
specifically made for this purpose.  Also add `-q` to force a quiet
output, inline with other guests.

References:

- [`pkg-install(8)`](https://www.freebsd.org/cgi/man.cgi?query=pkg-install&sektion=8)
- freebsd/freebsd-ports@cbf5576945
2019-12-17 12:53:24 -08:00
Gilles Cornu bcdda99dfa
ansible_local: Fix pip setup on Arch Linux guest
Add 'python' package requirement. Tested against `archlinux/archlinux`
box, at version "2019.11.24".
2019-12-17 12:51:39 -08:00
Gilles Cornu 069122f42c
[minor] Align Ruby formatting across ansible_local files
GH-11148: Remove unwanted formatting changes proposed in 920361150f.
2019-12-17 12:51:39 -08:00
Gilles Cornu a2b87eace4
Fix broken 'ansible_install' methods signature
- By the way: Trim the generate 'pip install' command in Ansible::Cap::Guest::Pip::pip_install
- GH-11048: Fix same regression for FreeBSD and SuSE guests.
- GH-6633:  Add RSpec examples to cover ansible_local 'cap' code.

Note: RedHat/Fedora guests are not covered yet by unit tests.
2019-12-17 12:51:39 -08:00
Stefan Koenen 04aeff4cc6
FIX #11048, add parameter `pip_install_cmd` to `ansible_install.rb` for arch guest.
ADD: Handling of `pip_install_cmd` in `ansible_install.rb` for arch guest.
2019-12-17 12:51:39 -08:00
Brian Cain aecd354c57
Merge pull request #11191 from samdbmg/fix-10914-ansible_local-hang
Don't prompt for input when installing Ansible
2019-12-17 11:30:48 -08:00
Jeff Bonhag d7a5f74897
Fixes #11128: Error if machine folder inaccessible (#11239)
This commit catches the Errno::EPERM raised by the operating system if
the machine folder is inaccessible and displays it as a more friendly
error message.

This can be an issue on macOS Catalina if virtual machine files are kept
in a special directory (Documents/Downloads/Desktop) that Vagrant's
embedded Ruby is not allowed to access.
2019-12-17 12:41:12 -05:00
Jeff Bonhag 2fa44f5b8f
Fixes #11218: Update apk cache when installing rsync (#11220)
This ensures that rsync can be installed on an Alpine Linux machine where the
apk cache may not be current.

Display a warning if the vagrant-alpine plugin is installed, since Alpine guest
support has been merged into Vagrant core.
2019-12-17 12:34:53 -05:00
Brian Cain 0b71991902
Merge pull request #11231 from briancain/add-force-option-for-box-outdated
Fixes #11228: Allow to force check for box updates
2019-12-17 08:42:51 -08:00
Brian Cain fb4e6985e1
Fixes #11249: Add VirtualBox provider support for version 6.1.x
This commit adds support for VirtualBox version 6.1.x. It simply
inherits from the base 6.0.x provider class.
2019-12-11 13:25:11 -08:00
Brian Cain bcf4d5a210
Fixes #11228: Allow to force check for box updates
Prior to this commit, if a user had recently checked for updates, there
was no way to force Vagrant to re-check without manually deleting a
state file in the local `.vagrant` data dir. This commit fixes that by
giving users the ability to force check for updates for a given box with
a flag to the `vagrant box outdated` command.
2019-12-03 11:42:55 -08:00
Jeff Bonhag c6ee1049aa
Darwin: put each NFS export on its own line (#11216)
This commit introduces a Darwin-specific template for NFS exports.  This is almost identical to the standard BSD template except it puts each NFS export on its own line.

This resolves NFS issues discovered in macOS Catalina.
2019-11-25 15:41:05 -05:00
Brian Cain f8449063b6
Have default names for primary and non-primary disks 2019-11-22 14:40:23 -08:00
Brian Cain b56dede627
Do not set primary option if it's not UNSET or false 2019-11-22 14:40:23 -08:00
Brian Cain f55aca091c
Wrap disk feature in experimental flag 2019-11-22 14:40:23 -08:00
Brian Cain 86f9243762
Move validation message to locales 2019-11-22 14:40:23 -08:00
Brian Cain 734aad1ede
Enforce unique names for disk config objects 2019-11-22 14:40:23 -08:00
Brian Cain b5b59a4eee
Base name for disk is vagrant_primary if primary 2019-11-22 14:40:23 -08:00
Brian Cain ea7a230cb6
Move disk config validation messages to locales file 2019-11-22 14:40:23 -08:00
Brian Cain 57fd731fbf
Add warning if machines provider was not found in disk provider config
opts
2019-11-22 14:40:23 -08:00
Brian Cain 3a2b4ddef2
Validate that disk file exists in disk config validate 2019-11-22 14:40:23 -08:00
Brian Cain 2e324a4971
Add conversion method for shortcut size in disk config 2019-11-22 14:40:23 -08:00
Brian Cain 271cf8a603
Begin to add Numeric class helper for converting size strings 2019-11-22 14:40:23 -08:00
Brian Cain 7feee7a87f
Add locale for primary disk validation error 2019-11-22 14:40:23 -08:00
Brian Cain a457dee8b0
Set default disk to non-primary 2019-11-22 14:40:23 -08:00
Brian Cain a51e9b1fa1
Support both kinds of provider config options for disk config 2019-11-22 14:40:23 -08:00
Brian Cain 83fea21ff1
Simplify builtin disk action 2019-11-22 14:40:23 -08:00
Brian Cain e598007237
Add provider specific disk options under provider_config hash 2019-11-22 14:40:23 -08:00
Brian Cain 6c54bf6ad9
Fix logger namespace typo 2019-11-22 14:40:23 -08:00
Brian Cain d54e870752
Add file option to disk config 2019-11-22 14:40:23 -08:00
Brian Cain 71ad0f7aba
Remove duplicate setting of disks variable 2019-11-22 14:40:23 -08:00
Brian Cain 35f113e759
Put back accidental case switching for comments on provisioner 2019-11-22 14:40:23 -08:00
Brian Cain 9c1d05113f
Update merge comment for disk config 2019-11-22 14:40:23 -08:00
Brian Cain 93828508ec
Update config/vm with tests for disk config 2019-11-22 14:40:23 -08:00
Brian Cain 499e39dd10
Ensure primary is true or false 2019-11-22 14:40:23 -08:00
Brian Cain cef1bd47b3
Add initial disk builtin action 2019-11-22 14:40:23 -08:00
Brian Cain a55e3d2b91
Make config.vm.disks accessible instead of internal 2019-11-22 14:40:23 -08:00
Brian Cain c18f36e516
Fix code comment typo 2019-11-22 14:40:23 -08:00
Brian Cain ad73969010
Fixup disk config parsing to allow hash and block 2019-11-22 14:40:23 -08:00
Brian Cain 7cfccb5cfd
Update variable docs for disk name 2019-11-22 14:40:23 -08:00
Brian Cain ee751ca6e1
Add disk name for disk config 2019-11-22 14:40:23 -08:00
Brian Cain 995c4bbc60
Add validation for disk configs 2019-11-22 14:40:23 -08:00
Brian Cain a18ce4f732
Add primary config option for disk 2019-11-22 14:40:23 -08:00
Brian Cain 393ce9eb1b
Rename drives to disks to match class, and properly merge configs 2019-11-22 14:40:23 -08:00
Brian Cain 28d339eac5
Ensure block is properly passed through to add_config 2019-11-22 14:40:23 -08:00
Brian Cain ee388d8293
Ensure config is renamed to options 2019-11-22 14:40:23 -08:00
Brian Cain 34673fe5f9
Add disk class function for provider layers 2019-11-22 14:40:23 -08:00
Brian Cain 98a2d0f723
Update internal drives state to be array instead of hash 2019-11-22 14:40:23 -08:00