vagrant 1.5.0 → 2.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.copywrite.hcl +15 -0
- data/.gitignore +79 -14
- data/.gitmodules +0 -0
- data/.vimrc +5 -0
- data/.yardopts +1 -0
- data/CHANGELOG.md +4512 -0
- data/Gemfile +10 -2
- data/LICENSE +92 -0
- data/README.md +55 -3
- data/RELEASE.md +11 -0
- data/Rakefile +22 -1
- data/Vagrantfile +31 -0
- data/bin/vagrant +268 -2
- data/contrib/README.md +17 -0
- data/contrib/bash/completion.sh +190 -0
- data/contrib/emacs/vagrant.el +11 -0
- data/contrib/st/Ruby.sublime-settings +6 -0
- data/contrib/sudoers/linux-fedora +7 -0
- data/contrib/sudoers/linux-suse +6 -0
- data/contrib/sudoers/linux-ubuntu +8 -0
- data/contrib/sudoers/osx +10 -0
- data/contrib/vim/vagrantfile.vim +9 -0
- data/contrib/zsh/_vagrant +738 -0
- data/contrib/zsh/generate_zsh_completion.rb +168 -0
- data/ext/vagrant/vagrant_ssl/extconf.rb +24 -0
- data/ext/vagrant/vagrant_ssl/vagrant_ssl.c +37 -0
- data/ext/vagrant/vagrant_ssl/vagrant_ssl.h +19 -0
- data/keys/README.md +23 -0
- data/keys/vagrant +27 -0
- data/keys/vagrant.key.ed25519 +7 -0
- data/keys/vagrant.key.rsa +27 -0
- data/keys/vagrant.pub +2 -0
- data/keys/vagrant.pub.ed25519 +1 -0
- data/keys/vagrant.pub.rsa +1 -0
- data/lib/vagrant/action/builder.rb +356 -0
- data/lib/vagrant/action/builtin/box_add.rb +638 -0
- data/lib/vagrant/action/builtin/box_check_outdated.rb +116 -0
- data/lib/vagrant/action/builtin/box_remove.rb +181 -0
- data/lib/vagrant/action/builtin/box_update.rb +23 -0
- data/lib/vagrant/action/builtin/call.rb +69 -0
- data/lib/vagrant/action/builtin/cleanup_disks.rb +59 -0
- data/lib/vagrant/action/builtin/cloud_init_setup.rb +125 -0
- data/lib/vagrant/action/builtin/cloud_init_wait.rb +35 -0
- data/lib/vagrant/action/builtin/config_validate.rb +33 -0
- data/lib/vagrant/action/builtin/confirm.rb +51 -0
- data/lib/vagrant/action/builtin/delayed.rb +29 -0
- data/lib/vagrant/action/builtin/destroy_confirm.rb +24 -0
- data/lib/vagrant/action/builtin/disk.rb +55 -0
- data/lib/vagrant/action/builtin/env_set.rb +27 -0
- data/lib/vagrant/action/builtin/graceful_halt.rb +88 -0
- data/lib/vagrant/action/builtin/handle_box.rb +111 -0
- data/lib/vagrant/action/builtin/handle_box_url.rb +17 -0
- data/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb +300 -0
- data/lib/vagrant/action/builtin/has_provisioner.rb +39 -0
- data/lib/vagrant/action/builtin/is_env_set.rb +25 -0
- data/lib/vagrant/action/builtin/is_state.rb +35 -0
- data/lib/vagrant/action/builtin/lock.rb +60 -0
- data/lib/vagrant/action/builtin/message.rb +29 -0
- data/lib/vagrant/action/builtin/mixin_provisioners.rb +159 -0
- data/lib/vagrant/action/builtin/mixin_synced_folders.rb +267 -0
- data/lib/vagrant/action/builtin/prepare_clone.rb +41 -0
- data/lib/vagrant/action/builtin/provision.rb +146 -0
- data/lib/vagrant/action/builtin/provisioner_cleanup.rb +57 -0
- data/lib/vagrant/action/builtin/set_hostname.rb +34 -0
- data/lib/vagrant/action/builtin/ssh_exec.rb +47 -0
- data/lib/vagrant/action/builtin/ssh_run.rb +88 -0
- data/lib/vagrant/action/builtin/synced_folder_cleanup.rb +36 -0
- data/lib/vagrant/action/builtin/synced_folders.rb +154 -0
- data/lib/vagrant/action/builtin/trigger.rb +40 -0
- data/lib/vagrant/action/builtin/wait_for_communicator.rb +82 -0
- data/lib/vagrant/action/general/package.rb +248 -0
- data/lib/vagrant/action/general/package_setup_files.rb +54 -0
- data/lib/vagrant/action/general/package_setup_folders.rb +40 -0
- data/lib/vagrant/action/hook.rb +163 -0
- data/lib/vagrant/action/primary_runner.rb +18 -0
- data/lib/vagrant/action/runner.rb +112 -0
- data/lib/vagrant/action/warden.rb +126 -0
- data/lib/vagrant/action.rb +88 -0
- data/lib/vagrant/alias.rb +59 -0
- data/lib/vagrant/batch_action.rb +181 -0
- data/lib/vagrant/box.rb +260 -0
- data/lib/vagrant/box_collection.rb +563 -0
- data/lib/vagrant/box_metadata.rb +275 -0
- data/lib/vagrant/bundler.rb +936 -0
- data/lib/vagrant/capability_host.rb +180 -0
- data/lib/vagrant/cli.rb +122 -0
- data/lib/vagrant/config/loader.rb +323 -0
- data/lib/vagrant/config/v1/dummy_config.rb +16 -0
- data/lib/vagrant/config/v1/loader.rb +108 -0
- data/lib/vagrant/config/v1/root.rb +63 -0
- data/lib/vagrant/config/v1.rb +12 -0
- data/lib/vagrant/config/v2/dummy_config.rb +60 -0
- data/lib/vagrant/config/v2/loader.rb +154 -0
- data/lib/vagrant/config/v2/root.rb +122 -0
- data/lib/vagrant/config/v2/util.rb +24 -0
- data/lib/vagrant/config/v2.rb +13 -0
- data/lib/vagrant/config/version_base.rb +83 -0
- data/lib/vagrant/config.rb +64 -0
- data/lib/vagrant/environment.rb +1230 -0
- data/lib/vagrant/errors.rb +1158 -0
- data/lib/vagrant/guest.rb +72 -0
- data/lib/vagrant/host.rb +19 -0
- data/lib/vagrant/machine.rb +672 -0
- data/lib/vagrant/machine_index.rb +527 -0
- data/lib/vagrant/machine_state.rb +54 -0
- data/lib/vagrant/patches/builder/mkmf.rb +116 -0
- data/lib/vagrant/patches/fake_ftp.rb +28 -0
- data/lib/vagrant/patches/log4r.rb +54 -0
- data/lib/vagrant/patches/net-ssh.rb +76 -0
- data/lib/vagrant/patches/rubygems.rb +23 -0
- data/lib/vagrant/patches/timeout_error.rb +5 -0
- data/lib/vagrant/plugin/manager.rb +406 -0
- data/lib/vagrant/plugin/state_file.rb +136 -0
- data/lib/vagrant/plugin/v1/command.rb +171 -0
- data/lib/vagrant/plugin/v1/communicator.rb +101 -0
- data/lib/vagrant/plugin/v1/config.rb +115 -0
- data/lib/vagrant/plugin/v1/errors.rb +18 -0
- data/lib/vagrant/plugin/v1/guest.rb +95 -0
- data/lib/vagrant/plugin/v1/host.rb +69 -0
- data/lib/vagrant/plugin/v1/manager.rb +134 -0
- data/lib/vagrant/plugin/v1/plugin.rb +231 -0
- data/lib/vagrant/plugin/v1/provider.rb +71 -0
- data/lib/vagrant/plugin/v1/provisioner.rb +53 -0
- data/lib/vagrant/plugin/v1.rb +25 -0
- data/lib/vagrant/plugin/v2/command.rb +309 -0
- data/lib/vagrant/plugin/v2/communicator.rb +133 -0
- data/lib/vagrant/plugin/v2/components.rb +94 -0
- data/lib/vagrant/plugin/v2/config.rb +167 -0
- data/lib/vagrant/plugin/v2/errors.rb +18 -0
- data/lib/vagrant/plugin/v2/guest.rb +26 -0
- data/lib/vagrant/plugin/v2/host.rb +22 -0
- data/lib/vagrant/plugin/v2/manager.rb +306 -0
- data/lib/vagrant/plugin/v2/plugin.rb +296 -0
- data/lib/vagrant/plugin/v2/provider.rb +118 -0
- data/lib/vagrant/plugin/v2/provisioner.rb +56 -0
- data/lib/vagrant/plugin/v2/push.rb +30 -0
- data/lib/vagrant/plugin/v2/synced_folder.rb +113 -0
- data/lib/vagrant/plugin/v2/trigger.rb +367 -0
- data/lib/vagrant/plugin/v2.rb +33 -0
- data/lib/vagrant/plugin.rb +11 -0
- data/lib/vagrant/registry.rb +113 -0
- data/lib/vagrant/shared_helpers.rb +238 -0
- data/lib/vagrant/ui.rb +449 -0
- data/lib/vagrant/util/ansi_escape_code_remover.rb +37 -0
- data/lib/vagrant/util/busy.rb +62 -0
- data/lib/vagrant/util/caps.rb +51 -0
- data/lib/vagrant/util/checkpoint_client.rb +186 -0
- data/lib/vagrant/util/command_deprecation.rb +59 -0
- data/lib/vagrant/util/counter.rb +27 -0
- data/lib/vagrant/util/credential_scrubber.rb +74 -0
- data/lib/vagrant/util/curl_helper.rb +104 -0
- data/lib/vagrant/util/deep_merge.rb +23 -0
- data/lib/vagrant/util/directory.rb +22 -0
- data/lib/vagrant/util/downloader.rb +278 -0
- data/lib/vagrant/util/env.rb +56 -0
- data/lib/vagrant/util/experimental.rb +79 -0
- data/lib/vagrant/util/file_checksum.rb +77 -0
- data/lib/vagrant/util/file_mode.rb +15 -0
- data/lib/vagrant/util/file_mutex.rb +50 -0
- data/lib/vagrant/util/guest_hosts.rb +71 -0
- data/lib/vagrant/util/guest_inspection.rb +118 -0
- data/lib/vagrant/util/guest_networks.rb +107 -0
- data/lib/vagrant/util/hash_with_indifferent_access.rb +66 -0
- data/lib/vagrant/util/install_cli_autocomplete.rb +121 -0
- data/lib/vagrant/util/io.rb +53 -0
- data/lib/vagrant/util/ipv4_interfaces.rb +18 -0
- data/lib/vagrant/util/is_port_open.rb +31 -0
- data/lib/vagrant/util/keypair.rb +293 -0
- data/lib/vagrant/util/line_buffer.rb +63 -0
- data/lib/vagrant/util/line_ending_helpers.rb +17 -0
- data/lib/vagrant/util/logging_formatter.rb +70 -0
- data/lib/vagrant/util/map_command_options.rb +36 -0
- data/lib/vagrant/util/mime.rb +95 -0
- data/lib/vagrant/util/network_ip.rb +27 -0
- data/lib/vagrant/util/numeric.rb +92 -0
- data/lib/vagrant/util/platform.rb +737 -0
- data/lib/vagrant/util/powershell.rb +316 -0
- data/lib/vagrant/util/presence.rb +48 -0
- data/lib/vagrant/util/retryable.rb +34 -0
- data/lib/vagrant/util/safe_chdir.rb +36 -0
- data/lib/vagrant/util/safe_env.rb +17 -0
- data/lib/vagrant/util/safe_exec.rb +78 -0
- data/lib/vagrant/util/safe_puts.rb +34 -0
- data/lib/vagrant/util/scoped_hash_override.rb +47 -0
- data/lib/vagrant/util/shell_quote.rb +18 -0
- data/lib/vagrant/util/silence_warnings.rb +17 -0
- data/lib/vagrant/util/ssh.rb +267 -0
- data/lib/vagrant/util/stacked_proc_runner.rb +38 -0
- data/lib/vagrant/util/string_block_editor.rb +80 -0
- data/lib/vagrant/util/subprocess.rb +365 -0
- data/lib/vagrant/util/template_renderer.rb +91 -0
- data/lib/vagrant/util/uploader.rb +109 -0
- data/lib/vagrant/util/which.rb +56 -0
- data/lib/vagrant/util/windows_path.rb +41 -0
- data/lib/vagrant/util.rb +63 -0
- data/lib/vagrant/vagrantfile.rb +320 -0
- data/lib/vagrant/version.rb +10 -0
- data/lib/vagrant.rb +380 -0
- data/plugins/README.md +11 -0
- data/plugins/commands/autocomplete/command/install.rb +52 -0
- data/plugins/commands/autocomplete/command/root.rb +69 -0
- data/plugins/commands/autocomplete/plugin.rb +21 -0
- data/plugins/commands/box/command/add.rb +111 -0
- data/plugins/commands/box/command/download_mixins.rb +32 -0
- data/plugins/commands/box/command/list.rb +82 -0
- data/plugins/commands/box/command/outdated.rb +109 -0
- data/plugins/commands/box/command/prune.rb +136 -0
- data/plugins/commands/box/command/remove.rb +83 -0
- data/plugins/commands/box/command/repackage.rb +46 -0
- data/plugins/commands/box/command/root.rb +98 -0
- data/plugins/commands/box/command/update.rb +206 -0
- data/plugins/commands/box/plugin.rb +18 -0
- data/plugins/commands/cap/command.rb +83 -0
- data/plugins/commands/cap/plugin.rb +20 -0
- data/plugins/commands/cloud/auth/login.rb +90 -0
- data/plugins/commands/cloud/auth/logout.rb +37 -0
- data/plugins/commands/cloud/auth/middleware/add_authentication.rb +116 -0
- data/plugins/commands/cloud/auth/middleware/add_downloader_authentication.rb +68 -0
- data/plugins/commands/cloud/auth/plugin.rb +23 -0
- data/plugins/commands/cloud/auth/root.rb +77 -0
- data/plugins/commands/cloud/auth/whoami.rb +63 -0
- data/plugins/commands/cloud/box/create.rb +82 -0
- data/plugins/commands/cloud/box/delete.rb +74 -0
- data/plugins/commands/cloud/box/plugin.rb +22 -0
- data/plugins/commands/cloud/box/root.rb +81 -0
- data/plugins/commands/cloud/box/show.rb +133 -0
- data/plugins/commands/cloud/box/update.rb +82 -0
- data/plugins/commands/cloud/client/client.rb +257 -0
- data/plugins/commands/cloud/errors.rb +31 -0
- data/plugins/commands/cloud/list.rb +54 -0
- data/plugins/commands/cloud/locales/en.yml +197 -0
- data/plugins/commands/cloud/plugin.rb +48 -0
- data/plugins/commands/cloud/provider/create.rb +105 -0
- data/plugins/commands/cloud/provider/delete.rb +109 -0
- data/plugins/commands/cloud/provider/plugin.rb +22 -0
- data/plugins/commands/cloud/provider/root.rb +81 -0
- data/plugins/commands/cloud/provider/update.rb +102 -0
- data/plugins/commands/cloud/provider/upload.rb +100 -0
- data/plugins/commands/cloud/publish.rb +297 -0
- data/plugins/commands/cloud/root.rb +108 -0
- data/plugins/commands/cloud/search.rb +102 -0
- data/plugins/commands/cloud/util.rb +371 -0
- data/plugins/commands/cloud/version/create.rb +77 -0
- data/plugins/commands/cloud/version/delete.rb +78 -0
- data/plugins/commands/cloud/version/plugin.rb +22 -0
- data/plugins/commands/cloud/version/release.rb +78 -0
- data/plugins/commands/cloud/version/revoke.rb +79 -0
- data/plugins/commands/cloud/version/root.rb +85 -0
- data/plugins/commands/cloud/version/update.rb +76 -0
- data/plugins/commands/destroy/command.rb +79 -0
- data/plugins/commands/destroy/plugin.rb +21 -0
- data/plugins/commands/global-status/command.rb +114 -0
- data/plugins/commands/global-status/plugin.rb +21 -0
- data/plugins/commands/halt/command.rb +42 -0
- data/plugins/commands/halt/plugin.rb +21 -0
- data/plugins/commands/help/command.rb +19 -0
- data/plugins/commands/help/plugin.rb +20 -0
- data/plugins/commands/init/command.rb +110 -0
- data/plugins/commands/init/plugin.rb +21 -0
- data/plugins/commands/list-commands/command.rb +46 -0
- data/plugins/commands/list-commands/plugin.rb +21 -0
- data/plugins/commands/login/plugin.rb +20 -0
- data/plugins/commands/package/command.rb +104 -0
- data/plugins/commands/package/plugin.rb +21 -0
- data/plugins/commands/plugin/action/expunge_plugins.rb +77 -0
- data/plugins/commands/plugin/action/install_gem.rb +80 -0
- data/plugins/commands/plugin/action/license_plugin.rb +48 -0
- data/plugins/commands/plugin/action/list_plugins.rb +79 -0
- data/plugins/commands/plugin/action/plugin_exists_check.rb +28 -0
- data/plugins/commands/plugin/action/repair_plugins.rb +67 -0
- data/plugins/commands/plugin/action/uninstall_plugin.rb +28 -0
- data/plugins/commands/plugin/action/update_gems.rb +52 -0
- data/plugins/commands/plugin/action.rb +82 -0
- data/plugins/commands/plugin/command/base.rb +22 -0
- data/plugins/commands/plugin/command/expunge.rb +95 -0
- data/plugins/commands/plugin/command/install.rb +90 -0
- data/plugins/commands/plugin/command/license.rb +34 -0
- data/plugins/commands/plugin/command/list.rb +34 -0
- data/plugins/commands/plugin/command/mixin_install_opts.rb +34 -0
- data/plugins/commands/plugin/command/repair.rb +41 -0
- data/plugins/commands/plugin/command/root.rb +98 -0
- data/plugins/commands/plugin/command/uninstall.rb +38 -0
- data/plugins/commands/plugin/command/update.rb +42 -0
- data/plugins/commands/plugin/gem_helper.rb +89 -0
- data/plugins/commands/plugin/plugin.rb +23 -0
- data/plugins/commands/port/command.rb +91 -0
- data/plugins/commands/port/locales/en.yml +23 -0
- data/plugins/commands/port/plugin.rb +30 -0
- data/plugins/commands/powershell/command.rb +132 -0
- data/plugins/commands/powershell/errors.rb +29 -0
- data/plugins/commands/powershell/plugin.rb +34 -0
- data/plugins/commands/powershell/scripts/enable_psremoting.ps1 +63 -0
- data/plugins/commands/powershell/scripts/reset_trustedhosts.ps1 +15 -0
- data/plugins/commands/provider/command.rb +77 -0
- data/plugins/commands/provider/plugin.rb +21 -0
- data/plugins/commands/provision/command.rb +41 -0
- data/plugins/commands/provision/plugin.rb +21 -0
- data/plugins/commands/push/command.rb +78 -0
- data/plugins/commands/push/plugin.rb +20 -0
- data/plugins/commands/rdp/command.rb +114 -0
- data/plugins/commands/rdp/config.rb +29 -0
- data/plugins/commands/rdp/errors.rb +21 -0
- data/plugins/commands/rdp/plugin.rb +39 -0
- data/plugins/commands/reload/command.rb +67 -0
- data/plugins/commands/reload/plugin.rb +21 -0
- data/plugins/commands/resume/command.rb +46 -0
- data/plugins/commands/resume/plugin.rb +20 -0
- data/plugins/commands/snapshot/command/delete.rb +50 -0
- data/plugins/commands/snapshot/command/list.rb +50 -0
- data/plugins/commands/snapshot/command/pop.rb +52 -0
- data/plugins/commands/snapshot/command/push.rb +36 -0
- data/plugins/commands/snapshot/command/push_shared.rb +58 -0
- data/plugins/commands/snapshot/command/restore.rb +67 -0
- data/plugins/commands/snapshot/command/root.rb +95 -0
- data/plugins/commands/snapshot/command/save.rb +75 -0
- data/plugins/commands/snapshot/plugin.rb +18 -0
- data/plugins/commands/ssh/command.rb +80 -0
- data/plugins/commands/ssh/plugin.rb +20 -0
- data/plugins/commands/ssh_config/command.rb +78 -0
- data/plugins/commands/ssh_config/plugin.rb +21 -0
- data/plugins/commands/status/command.rb +59 -0
- data/plugins/commands/status/plugin.rb +21 -0
- data/plugins/commands/suspend/command.rb +49 -0
- data/plugins/commands/suspend/plugin.rb +21 -0
- data/plugins/commands/up/command.rb +194 -0
- data/plugins/commands/up/middleware/store_box_metadata.rb +40 -0
- data/plugins/commands/up/plugin.rb +25 -0
- data/plugins/commands/up/start_mixins.rb +58 -0
- data/plugins/commands/upload/command.rb +239 -0
- data/plugins/commands/upload/plugin.rb +20 -0
- data/plugins/commands/validate/command.rb +107 -0
- data/plugins/commands/validate/plugin.rb +20 -0
- data/plugins/commands/version/command.rb +60 -0
- data/plugins/commands/version/plugin.rb +21 -0
- data/plugins/commands/winrm/command.rb +71 -0
- data/plugins/commands/winrm/plugin.rb +20 -0
- data/plugins/commands/winrm_config/command.rb +129 -0
- data/plugins/commands/winrm_config/plugin.rb +20 -0
- data/plugins/communicators/ssh/communicator.rb +898 -0
- data/plugins/communicators/ssh/plugin.rb +22 -0
- data/plugins/communicators/winrm/command_filter.rb +49 -0
- data/plugins/communicators/winrm/command_filters/cat.rb +26 -0
- data/plugins/communicators/winrm/command_filters/chmod.rb +20 -0
- data/plugins/communicators/winrm/command_filters/chown.rb +20 -0
- data/plugins/communicators/winrm/command_filters/grep.rb +26 -0
- data/plugins/communicators/winrm/command_filters/mkdir.rb +30 -0
- data/plugins/communicators/winrm/command_filters/rm.rb +50 -0
- data/plugins/communicators/winrm/command_filters/test.rb +68 -0
- data/plugins/communicators/winrm/command_filters/uname.rb +30 -0
- data/plugins/communicators/winrm/command_filters/which.rb +27 -0
- data/plugins/communicators/winrm/communicator.rb +230 -0
- data/plugins/communicators/winrm/config.rb +76 -0
- data/plugins/communicators/winrm/errors.rb +72 -0
- data/plugins/communicators/winrm/helper.rb +91 -0
- data/plugins/communicators/winrm/plugin.rb +69 -0
- data/plugins/communicators/winrm/shell.rb +267 -0
- data/plugins/communicators/winssh/communicator.rb +252 -0
- data/plugins/communicators/winssh/config.rb +37 -0
- data/plugins/communicators/winssh/plugin.rb +24 -0
- data/plugins/guests/alma/cap/flavor.rb +26 -0
- data/plugins/guests/alma/guest.rb +13 -0
- data/plugins/guests/alma/plugin.rb +23 -0
- data/plugins/guests/alpine/cap/change_host_name.rb +85 -0
- data/plugins/guests/alpine/cap/configure_networks.rb +67 -0
- data/plugins/guests/alpine/cap/halt.rb +24 -0
- data/plugins/guests/alpine/cap/nfs_client.rb +17 -0
- data/plugins/guests/alpine/cap/rsync.rb +20 -0
- data/plugins/guests/alpine/cap/smb.rb +16 -0
- data/plugins/guests/alpine/guest.rb +14 -0
- data/plugins/guests/alpine/plugin.rb +69 -0
- data/plugins/guests/alt/cap/change_host_name.rb +55 -0
- data/plugins/guests/alt/cap/configure_networks.rb +132 -0
- data/plugins/guests/alt/cap/flavor.rb +66 -0
- data/plugins/guests/alt/cap/network_scripts_dir.rb +14 -0
- data/plugins/guests/alt/cap/rsync.rb +16 -0
- data/plugins/guests/alt/guest.rb +12 -0
- data/plugins/guests/alt/plugin.rb +43 -0
- data/plugins/guests/amazon/cap/configure_networks.rb +26 -0
- data/plugins/guests/amazon/cap/flavor.rb +17 -0
- data/plugins/guests/amazon/guest.rb +12 -0
- data/plugins/guests/amazon/plugin.rb +28 -0
- data/plugins/guests/arch/cap/change_host_name.rb +18 -0
- data/plugins/guests/arch/cap/configure_networks.rb +81 -0
- data/plugins/guests/arch/cap/nfs.rb +36 -0
- data/plugins/guests/arch/cap/rsync.rb +19 -0
- data/plugins/guests/arch/cap/smb.rb +20 -0
- data/plugins/guests/arch/guest.rb +14 -0
- data/plugins/guests/arch/plugin.rb +53 -0
- data/plugins/guests/atomic/cap/change_host_name.rb +18 -0
- data/plugins/guests/atomic/cap/docker.rb +14 -0
- data/plugins/guests/atomic/guest.rb +14 -0
- data/plugins/guests/atomic/plugin.rb +28 -0
- data/plugins/guests/bsd/cap/file_system.rb +80 -0
- data/plugins/guests/bsd/cap/halt.rb +19 -0
- data/plugins/guests/bsd/cap/mount_virtualbox_shared_folder.rb +19 -0
- data/plugins/guests/bsd/cap/nfs.rb +50 -0
- data/plugins/guests/bsd/cap/public_key.rb +69 -0
- data/plugins/guests/bsd/guest.rb +12 -0
- data/plugins/guests/bsd/plugin.rb +58 -0
- data/plugins/guests/centos/cap/flavor.rb +32 -0
- data/plugins/guests/centos/guest.rb +14 -0
- data/plugins/guests/centos/plugin.rb +23 -0
- data/plugins/guests/coreos/cap/change_host_name.rb +41 -0
- data/plugins/guests/coreos/cap/configure_networks.rb +138 -0
- data/plugins/guests/coreos/cap/docker.rb +14 -0
- data/plugins/guests/coreos/guest.rb +14 -0
- data/plugins/guests/coreos/plugin.rb +33 -0
- data/plugins/guests/darwin/cap/change_host_name.rb +43 -0
- data/plugins/guests/darwin/cap/choose_addressable_ip_addr.rb +23 -0
- data/plugins/guests/darwin/cap/configure_networks.rb +126 -0
- data/plugins/guests/darwin/cap/darwin_version.rb +43 -0
- data/plugins/guests/darwin/cap/halt.rb +21 -0
- data/plugins/guests/darwin/cap/mount_smb_shared_folder.rb +46 -0
- data/plugins/guests/darwin/cap/mount_vmware_shared_folder.rb +135 -0
- data/plugins/guests/darwin/cap/rsync.rb +14 -0
- data/plugins/guests/darwin/cap/shell_expand_guest_path.rb +30 -0
- data/plugins/guests/darwin/cap/verify_vmware_hgfs.rb +15 -0
- data/plugins/guests/darwin/guest.rb +18 -0
- data/plugins/guests/darwin/plugin.rb +93 -0
- data/plugins/guests/debian/cap/change_host_name.rb +110 -0
- data/plugins/guests/debian/cap/configure_networks.rb +205 -0
- data/plugins/guests/debian/cap/nfs.rb +19 -0
- data/plugins/guests/debian/cap/rsync.rb +18 -0
- data/plugins/guests/debian/cap/smb.rb +20 -0
- data/plugins/guests/debian/guest.rb +13 -0
- data/plugins/guests/debian/plugin.rb +43 -0
- data/plugins/guests/dragonflybsd/guest.rb +12 -0
- data/plugins/guests/dragonflybsd/plugin.rb +18 -0
- data/plugins/guests/elementary/guest.rb +13 -0
- data/plugins/guests/elementary/plugin.rb +18 -0
- data/plugins/guests/esxi/cap/change_host_name.rb +16 -0
- data/plugins/guests/esxi/cap/configure_networks.rb +41 -0
- data/plugins/guests/esxi/cap/halt.rb +19 -0
- data/plugins/guests/esxi/cap/mount_nfs_folder.rb +43 -0
- data/plugins/guests/esxi/cap/public_key.rb +68 -0
- data/plugins/guests/esxi/guest.rb +14 -0
- data/plugins/guests/esxi/plugin.rb +49 -0
- data/plugins/guests/fedora/cap/flavor.rb +26 -0
- data/plugins/guests/fedora/guest.rb +14 -0
- data/plugins/guests/fedora/plugin.rb +23 -0
- data/plugins/guests/freebsd/cap/change_host_name.rb +34 -0
- data/plugins/guests/freebsd/cap/configure_networks.rb +70 -0
- data/plugins/guests/freebsd/cap/mount_virtualbox_shared_folder.rb +79 -0
- data/plugins/guests/freebsd/cap/rsync.rb +18 -0
- data/plugins/guests/freebsd/cap/shell_expand_guest_path.rb +31 -0
- data/plugins/guests/freebsd/guest.rb +17 -0
- data/plugins/guests/freebsd/plugin.rb +68 -0
- data/plugins/guests/funtoo/cap/configure_networks.rb +50 -0
- data/plugins/guests/funtoo/guest.rb +12 -0
- data/plugins/guests/funtoo/plugin.rb +23 -0
- data/plugins/guests/gentoo/cap/change_host_name.rb +27 -0
- data/plugins/guests/gentoo/cap/configure_networks.rb +92 -0
- data/plugins/guests/gentoo/guest.rb +12 -0
- data/plugins/guests/gentoo/plugin.rb +28 -0
- data/plugins/guests/haiku/cap/change_host_name.rb +36 -0
- data/plugins/guests/haiku/cap/halt.rb +19 -0
- data/plugins/guests/haiku/cap/insert_public_key.rb +24 -0
- data/plugins/guests/haiku/cap/remove_public_key.rb +24 -0
- data/plugins/guests/haiku/cap/rsync.rb +22 -0
- data/plugins/guests/haiku/guest.rb +14 -0
- data/plugins/guests/haiku/plugin.rb +53 -0
- data/plugins/guests/kali/guest.rb +13 -0
- data/plugins/guests/kali/plugin.rb +18 -0
- data/plugins/guests/linux/cap/change_host_name.rb +49 -0
- data/plugins/guests/linux/cap/choose_addressable_ip_addr.rb +22 -0
- data/plugins/guests/linux/cap/file_system.rb +82 -0
- data/plugins/guests/linux/cap/halt.rb +27 -0
- data/plugins/guests/linux/cap/mount_smb_shared_folder.rb +95 -0
- data/plugins/guests/linux/cap/mount_virtualbox_shared_folder.rb +78 -0
- data/plugins/guests/linux/cap/network_interfaces.rb +89 -0
- data/plugins/guests/linux/cap/nfs.rb +51 -0
- data/plugins/guests/linux/cap/persist_mount_shared_folder.rb +77 -0
- data/plugins/guests/linux/cap/port.rb +14 -0
- data/plugins/guests/linux/cap/public_key.rb +65 -0
- data/plugins/guests/linux/cap/read_ip_address.rb +28 -0
- data/plugins/guests/linux/cap/reboot.rb +74 -0
- data/plugins/guests/linux/cap/rsync.rb +14 -0
- data/plugins/guests/linux/cap/shell_expand_guest_path.rb +35 -0
- data/plugins/guests/linux/guest.rb +26 -0
- data/plugins/guests/linux/plugin.rb +139 -0
- data/plugins/guests/mint/guest.rb +13 -0
- data/plugins/guests/mint/plugin.rb +18 -0
- data/plugins/guests/netbsd/cap/change_host_name.rb +20 -0
- data/plugins/guests/netbsd/cap/configure_networks.rb +56 -0
- data/plugins/guests/netbsd/cap/rsync.rb +23 -0
- data/plugins/guests/netbsd/cap/shell_expand_guest_path.rb +30 -0
- data/plugins/guests/netbsd/guest.rb +14 -0
- data/plugins/guests/netbsd/plugin.rb +58 -0
- data/plugins/guests/nixos/cap/change_host_name.rb +47 -0
- data/plugins/guests/nixos/cap/configure_networks.rb +135 -0
- data/plugins/guests/nixos/cap/nfs_client.rb +14 -0
- data/plugins/guests/nixos/guest.rb +20 -0
- data/plugins/guests/nixos/plugin.rb +33 -0
- data/plugins/guests/omnios/cap/change_host_name.rb +23 -0
- data/plugins/guests/omnios/cap/mount_nfs_folder.rb +24 -0
- data/plugins/guests/omnios/cap/rsync.rb +14 -0
- data/plugins/guests/omnios/guest.rb +12 -0
- data/plugins/guests/omnios/plugin.rb +33 -0
- data/plugins/guests/openbsd/cap/change_host_name.rb +35 -0
- data/plugins/guests/openbsd/cap/configure_networks.rb +49 -0
- data/plugins/guests/openbsd/cap/halt.rb +22 -0
- data/plugins/guests/openbsd/cap/rsync.rb +32 -0
- data/plugins/guests/openbsd/cap/shell_expand_guest_path.rb +30 -0
- data/plugins/guests/openbsd/guest.rb +14 -0
- data/plugins/guests/openbsd/plugin.rb +63 -0
- data/plugins/guests/openwrt/cap/change_host_name.rb +22 -0
- data/plugins/guests/openwrt/cap/halt.rb +19 -0
- data/plugins/guests/openwrt/cap/insert_public_key.rb +23 -0
- data/plugins/guests/openwrt/cap/remove_public_key.rb +25 -0
- data/plugins/guests/openwrt/cap/rsync.rb +38 -0
- data/plugins/guests/openwrt/guest.rb +26 -0
- data/plugins/guests/openwrt/plugin.rb +64 -0
- data/plugins/guests/photon/cap/change_host_name.rb +22 -0
- data/plugins/guests/photon/cap/configure_networks.rb +33 -0
- data/plugins/guests/photon/cap/docker.rb +14 -0
- data/plugins/guests/photon/guest.rb +12 -0
- data/plugins/guests/photon/plugin.rb +33 -0
- data/plugins/guests/pld/cap/change_host_name.rb +26 -0
- data/plugins/guests/pld/cap/flavor.rb +14 -0
- data/plugins/guests/pld/cap/network_scripts_dir.rb +14 -0
- data/plugins/guests/pld/guest.rb +12 -0
- data/plugins/guests/pld/plugin.rb +33 -0
- data/plugins/guests/redhat/cap/change_host_name.rb +59 -0
- data/plugins/guests/redhat/cap/configure_networks.rb +113 -0
- data/plugins/guests/redhat/cap/flavor.rb +32 -0
- data/plugins/guests/redhat/cap/network_scripts_dir.rb +18 -0
- data/plugins/guests/redhat/cap/nfs_client.rb +33 -0
- data/plugins/guests/redhat/cap/rsync.rb +20 -0
- data/plugins/guests/redhat/cap/smb.rb +23 -0
- data/plugins/guests/redhat/guest.rb +12 -0
- data/plugins/guests/redhat/plugin.rb +53 -0
- data/plugins/guests/rocky/cap/flavor.rb +26 -0
- data/plugins/guests/rocky/guest.rb +13 -0
- data/plugins/guests/rocky/plugin.rb +23 -0
- data/plugins/guests/slackware/cap/change_host_name.rb +24 -0
- data/plugins/guests/slackware/cap/configure_networks.rb +51 -0
- data/plugins/guests/slackware/guest.rb +12 -0
- data/plugins/guests/slackware/plugin.rb +28 -0
- data/plugins/guests/smartos/cap/change_host_name.rb +29 -0
- data/plugins/guests/smartos/cap/configure_networks.rb +30 -0
- data/plugins/guests/smartos/cap/halt.rb +25 -0
- data/plugins/guests/smartos/cap/insert_public_key.rb +31 -0
- data/plugins/guests/smartos/cap/mount_nfs.rb +31 -0
- data/plugins/guests/smartos/cap/remove_public_key.rb +28 -0
- data/plugins/guests/smartos/cap/rsync.rb +36 -0
- data/plugins/guests/smartos/config.rb +18 -0
- data/plugins/guests/smartos/guest.rb +14 -0
- data/plugins/guests/smartos/plugin.rb +74 -0
- data/plugins/guests/solaris/cap/change_host_name.rb +20 -0
- data/plugins/guests/solaris/cap/configure_networks.rb +28 -0
- data/plugins/guests/solaris/cap/file_system.rb +80 -0
- data/plugins/guests/solaris/cap/halt.rb +25 -0
- data/plugins/guests/solaris/cap/insert_public_key.rb +25 -0
- data/plugins/guests/solaris/cap/mount_virtualbox_shared_folder.rb +44 -0
- data/plugins/guests/solaris/cap/remove_public_key.rb +25 -0
- data/plugins/guests/solaris/cap/rsync.rb +36 -0
- data/plugins/guests/solaris/config.rb +34 -0
- data/plugins/guests/solaris/guest.rb +17 -0
- data/plugins/guests/solaris/plugin.rb +88 -0
- data/plugins/guests/solaris11/cap/change_host_name.rb +26 -0
- data/plugins/guests/solaris11/cap/configure_networks.rb +37 -0
- data/plugins/guests/solaris11/config.rb +37 -0
- data/plugins/guests/solaris11/guest.rb +22 -0
- data/plugins/guests/solaris11/plugin.rb +42 -0
- data/plugins/guests/suse/cap/change_host_name.rb +48 -0
- data/plugins/guests/suse/cap/configure_networks.rb +53 -0
- data/plugins/guests/suse/cap/halt.rb +23 -0
- data/plugins/guests/suse/cap/network_scripts_dir.rb +14 -0
- data/plugins/guests/suse/cap/nfs_client.rb +18 -0
- data/plugins/guests/suse/cap/rsync.rb +18 -0
- data/plugins/guests/suse/guest.rb +12 -0
- data/plugins/guests/suse/plugin.rb +53 -0
- data/plugins/guests/tinycore/cap/change_host_name.rb +16 -0
- data/plugins/guests/tinycore/cap/configure_networks.rb +29 -0
- data/plugins/guests/tinycore/cap/halt.rb +19 -0
- data/plugins/guests/tinycore/cap/mount_nfs.rb +44 -0
- data/plugins/guests/tinycore/cap/rsync.rb +20 -0
- data/plugins/guests/tinycore/guest.rb +13 -0
- data/plugins/guests/tinycore/plugin.rb +43 -0
- data/plugins/guests/trisquel/guest.rb +12 -0
- data/plugins/guests/trisquel/plugin.rb +18 -0
- data/plugins/guests/ubuntu/guest.rb +13 -0
- data/plugins/guests/ubuntu/plugin.rb +18 -0
- data/plugins/guests/windows/cap/change_host_name.rb +36 -0
- data/plugins/guests/windows/cap/choose_addressable_ip_addr.rb +23 -0
- data/plugins/guests/windows/cap/configure_networks.rb +83 -0
- data/plugins/guests/windows/cap/file_system.rb +68 -0
- data/plugins/guests/windows/cap/halt.rb +19 -0
- data/plugins/guests/windows/cap/mount_shared_folder.rb +60 -0
- data/plugins/guests/windows/cap/public_key.rb +87 -0
- data/plugins/guests/windows/cap/reboot.rb +63 -0
- data/plugins/guests/windows/cap/rsync.rb +29 -0
- data/plugins/guests/windows/config.rb +26 -0
- data/plugins/guests/windows/errors.rb +25 -0
- data/plugins/guests/windows/guest.rb +13 -0
- data/plugins/guests/windows/guest_network.rb +128 -0
- data/plugins/guests/windows/plugin.rb +116 -0
- data/plugins/guests/windows/scripts/mount_volume.ps1.erb +48 -0
- data/plugins/guests/windows/scripts/reboot_detect.ps1 +50 -0
- data/plugins/guests/windows/scripts/set_work_network.ps1 +9 -0
- data/plugins/guests/windows/scripts/winrs_v3_get_adapters.ps1 +14 -0
- data/plugins/hosts/alt/cap/nfs.rb +46 -0
- data/plugins/hosts/alt/host.rb +14 -0
- data/plugins/hosts/alt/plugin.rb +35 -0
- data/plugins/hosts/arch/cap/nfs.rb +22 -0
- data/plugins/hosts/arch/host.rb +14 -0
- data/plugins/hosts/arch/plugin.rb +35 -0
- data/plugins/hosts/bsd/cap/nfs.rb +218 -0
- data/plugins/hosts/bsd/cap/path.rb +14 -0
- data/plugins/hosts/bsd/cap/ssh.rb +19 -0
- data/plugins/hosts/bsd/host.rb +15 -0
- data/plugins/hosts/bsd/plugin.rb +63 -0
- data/plugins/hosts/darwin/cap/configured_ip_addresses.rb +21 -0
- data/plugins/hosts/darwin/cap/fs_iso.rb +52 -0
- data/plugins/hosts/darwin/cap/nfs.rb +14 -0
- data/plugins/hosts/darwin/cap/path.rb +66 -0
- data/plugins/hosts/darwin/cap/provider_install_virtualbox.rb +64 -0
- data/plugins/hosts/darwin/cap/rdp.rb +64 -0
- data/plugins/hosts/darwin/cap/smb.rb +128 -0
- data/plugins/hosts/darwin/cap/version.rb +26 -0
- data/plugins/hosts/darwin/host.rb +14 -0
- data/plugins/hosts/darwin/plugin.rb +83 -0
- data/plugins/hosts/darwin/scripts/install_virtualbox.sh +18 -0
- data/plugins/hosts/freebsd/cap/nfs.rb +34 -0
- data/plugins/hosts/freebsd/host.rb +15 -0
- data/plugins/hosts/freebsd/plugin.rb +34 -0
- data/plugins/hosts/gentoo/cap/nfs.rb +42 -0
- data/plugins/hosts/gentoo/host.rb +14 -0
- data/plugins/hosts/gentoo/plugin.rb +31 -0
- data/plugins/hosts/linux/cap/fs_iso.rb +52 -0
- data/plugins/hosts/linux/cap/nfs.rb +296 -0
- data/plugins/hosts/linux/cap/rdp.rb +59 -0
- data/plugins/hosts/linux/cap/ssh.rb +19 -0
- data/plugins/hosts/linux/host.rb +15 -0
- data/plugins/hosts/linux/plugin.rb +70 -0
- data/plugins/hosts/null/host.rb +15 -0
- data/plugins/hosts/null/plugin.rb +18 -0
- data/plugins/hosts/redhat/cap/nfs.rb +58 -0
- data/plugins/hosts/redhat/host.rb +31 -0
- data/plugins/hosts/redhat/plugin.rb +30 -0
- data/plugins/hosts/slackware/cap/nfs.rb +18 -0
- data/plugins/hosts/slackware/host.rb +15 -0
- data/plugins/hosts/slackware/plugin.rb +30 -0
- data/plugins/hosts/suse/cap/nfs.rb +22 -0
- data/plugins/hosts/suse/host.rb +30 -0
- data/plugins/hosts/suse/plugin.rb +33 -0
- data/plugins/hosts/void/cap/nfs.rb +27 -0
- data/plugins/hosts/void/host.rb +23 -0
- data/plugins/hosts/void/plugin.rb +33 -0
- data/plugins/hosts/windows/cap/configured_ip_addresses.rb +32 -0
- data/plugins/hosts/windows/cap/fs_iso.rb +51 -0
- data/plugins/hosts/windows/cap/nfs.rb +14 -0
- data/plugins/hosts/windows/cap/provider_install_virtualbox.rb +65 -0
- data/plugins/hosts/windows/cap/ps.rb +50 -0
- data/plugins/hosts/windows/cap/rdp.rb +33 -0
- data/plugins/hosts/windows/cap/smb.rb +203 -0
- data/plugins/hosts/windows/cap/ssh.rb +29 -0
- data/plugins/hosts/windows/host.rb +26 -0
- data/plugins/hosts/windows/plugin.rb +83 -0
- data/plugins/hosts/windows/scripts/check_credentials.ps1 +37 -0
- data/plugins/hosts/windows/scripts/host_info.ps1 +24 -0
- data/plugins/hosts/windows/scripts/install_virtualbox.ps1 +40 -0
- data/plugins/hosts/windows/scripts/set_share.ps1 +40 -0
- data/plugins/hosts/windows/scripts/set_ssh_key_permissions.ps1 +20 -0
- data/plugins/hosts/windows/scripts/unset_share.ps1 +13 -0
- data/plugins/hosts/windows/scripts/utils/VagrantSSH/VagrantSSH.psm1 +29 -0
- data/plugins/kernel_v1/config/nfs.rb +23 -0
- data/plugins/kernel_v1/config/package.rb +20 -0
- data/plugins/kernel_v1/config/ssh.rb +50 -0
- data/plugins/kernel_v1/config/vagrant.rb +34 -0
- data/plugins/kernel_v1/config/vm.rb +191 -0
- data/plugins/kernel_v1/plugin.rb +47 -0
- data/plugins/kernel_v2/config/cloud_init.rb +136 -0
- data/plugins/kernel_v2/config/disk.rb +224 -0
- data/plugins/kernel_v2/config/package.rb +24 -0
- data/plugins/kernel_v2/config/push.rb +155 -0
- data/plugins/kernel_v2/config/ssh.rb +93 -0
- data/plugins/kernel_v2/config/ssh_connect.rb +194 -0
- data/plugins/kernel_v2/config/trigger.rb +214 -0
- data/plugins/kernel_v2/config/vagrant.rb +99 -0
- data/plugins/kernel_v2/config/vm.rb +1062 -0
- data/plugins/kernel_v2/config/vm_provisioner.rb +202 -0
- data/plugins/kernel_v2/config/vm_subvm.rb +33 -0
- data/plugins/kernel_v2/config/vm_trigger.rb +297 -0
- data/plugins/kernel_v2/plugin.rb +71 -0
- data/plugins/providers/docker/action/build.rb +99 -0
- data/plugins/providers/docker/action/compare_synced_folders.rb +65 -0
- data/plugins/providers/docker/action/connect_networks.rb +80 -0
- data/plugins/providers/docker/action/create.rb +162 -0
- data/plugins/providers/docker/action/destroy.rb +34 -0
- data/plugins/providers/docker/action/destroy_build_image.rb +51 -0
- data/plugins/providers/docker/action/destroy_network.rb +53 -0
- data/plugins/providers/docker/action/forwarded_ports.rb +36 -0
- data/plugins/providers/docker/action/has_ssh.rb +21 -0
- data/plugins/providers/docker/action/host_machine.rb +75 -0
- data/plugins/providers/docker/action/host_machine_build_dir.rb +48 -0
- data/plugins/providers/docker/action/host_machine_port_checker.rb +34 -0
- data/plugins/providers/docker/action/host_machine_port_warning.rb +40 -0
- data/plugins/providers/docker/action/host_machine_required.rb +20 -0
- data/plugins/providers/docker/action/host_machine_sync_folders.rb +175 -0
- data/plugins/providers/docker/action/host_machine_sync_folders_disable.rb +91 -0
- data/plugins/providers/docker/action/init_state.rb +23 -0
- data/plugins/providers/docker/action/is_build.rb +19 -0
- data/plugins/providers/docker/action/is_host_machine_created.rb +32 -0
- data/plugins/providers/docker/action/login.rb +51 -0
- data/plugins/providers/docker/action/prepare_forwarded_port_collision_params.rb +64 -0
- data/plugins/providers/docker/action/prepare_networks.rb +372 -0
- data/plugins/providers/docker/action/prepare_nfs_settings.rb +60 -0
- data/plugins/providers/docker/action/prepare_nfs_valid_ids.rb +22 -0
- data/plugins/providers/docker/action/prepare_ssh.rb +48 -0
- data/plugins/providers/docker/action/pull.rb +30 -0
- data/plugins/providers/docker/action/start.rb +24 -0
- data/plugins/providers/docker/action/stop.rb +24 -0
- data/plugins/providers/docker/action/wait_for_running.rb +70 -0
- data/plugins/providers/docker/action.rb +319 -0
- data/plugins/providers/docker/cap/has_communicator.rb +14 -0
- data/plugins/providers/docker/cap/proxy_machine.rb +15 -0
- data/plugins/providers/docker/cap/public_address.rb +26 -0
- data/plugins/providers/docker/command/exec.rb +112 -0
- data/plugins/providers/docker/command/logs.rb +111 -0
- data/plugins/providers/docker/command/run.rb +76 -0
- data/plugins/providers/docker/communicator.rb +199 -0
- data/plugins/providers/docker/config.rb +362 -0
- data/plugins/providers/docker/driver/compose.rb +315 -0
- data/plugins/providers/docker/driver.rb +416 -0
- data/plugins/providers/docker/errors.rb +108 -0
- data/plugins/providers/docker/executor/local.rb +48 -0
- data/plugins/providers/docker/executor/vagrant.rb +88 -0
- data/plugins/providers/docker/hostmachine/Vagrantfile +3 -0
- data/plugins/providers/docker/plugin.rb +89 -0
- data/plugins/providers/docker/provider.rb +215 -0
- data/plugins/providers/docker/synced_folder.rb +35 -0
- data/plugins/providers/hyperv/action/check_access.rb +27 -0
- data/plugins/providers/hyperv/action/check_enabled.rb +25 -0
- data/plugins/providers/hyperv/action/configure.rb +115 -0
- data/plugins/providers/hyperv/action/delete_vm.rb +28 -0
- data/plugins/providers/hyperv/action/export.rb +45 -0
- data/plugins/providers/hyperv/action/import.rb +86 -0
- data/plugins/providers/hyperv/action/is_windows.rb +19 -0
- data/plugins/providers/hyperv/action/message_will_not_destroy.rb +20 -0
- data/plugins/providers/hyperv/action/net_set_mac.rb +23 -0
- data/plugins/providers/hyperv/action/net_set_vlan.rb +23 -0
- data/plugins/providers/hyperv/action/package.rb +19 -0
- data/plugins/providers/hyperv/action/package_metadata_json.rb +37 -0
- data/plugins/providers/hyperv/action/package_setup_files.rb +19 -0
- data/plugins/providers/hyperv/action/package_setup_folders.rb +21 -0
- data/plugins/providers/hyperv/action/package_vagrantfile.rb +37 -0
- data/plugins/providers/hyperv/action/read_guest_ip.rb +45 -0
- data/plugins/providers/hyperv/action/read_state.rb +33 -0
- data/plugins/providers/hyperv/action/resume_vm.rb +20 -0
- data/plugins/providers/hyperv/action/set_name.rb +46 -0
- data/plugins/providers/hyperv/action/snapshot_delete.rb +30 -0
- data/plugins/providers/hyperv/action/snapshot_restore.rb +26 -0
- data/plugins/providers/hyperv/action/snapshot_save.rb +30 -0
- data/plugins/providers/hyperv/action/start_instance.rb +20 -0
- data/plugins/providers/hyperv/action/stop_instance.rb +20 -0
- data/plugins/providers/hyperv/action/suspend_vm.rb +20 -0
- data/plugins/providers/hyperv/action/wait_for_ip_address.rb +62 -0
- data/plugins/providers/hyperv/action.rb +326 -0
- data/plugins/providers/hyperv/cap/cleanup_disks.rb +92 -0
- data/plugins/providers/hyperv/cap/configure_disks.rb +248 -0
- data/plugins/providers/hyperv/cap/public_address.rb +18 -0
- data/plugins/providers/hyperv/cap/snapshot_list.rb +14 -0
- data/plugins/providers/hyperv/cap/validate_disk_ext.rb +37 -0
- data/plugins/providers/hyperv/config.rb +148 -0
- data/plugins/providers/hyperv/driver.rb +368 -0
- data/plugins/providers/hyperv/errors.rb +49 -0
- data/plugins/providers/hyperv/plugin.rb +74 -0
- data/plugins/providers/hyperv/provider.rb +116 -0
- data/plugins/providers/hyperv/scripts/add_dvd.ps1 +18 -0
- data/plugins/providers/hyperv/scripts/attach_disk_drive.ps1 +31 -0
- data/plugins/providers/hyperv/scripts/check_hyperv.ps1 +11 -0
- data/plugins/providers/hyperv/scripts/check_hyperv_access.ps1 +17 -0
- data/plugins/providers/hyperv/scripts/clone_vhd.ps1 +21 -0
- data/plugins/providers/hyperv/scripts/configure_vm.ps1 +130 -0
- data/plugins/providers/hyperv/scripts/create_snapshot.ps1 +27 -0
- data/plugins/providers/hyperv/scripts/delete_snapshot.ps1 +19 -0
- data/plugins/providers/hyperv/scripts/delete_vm.ps1 +22 -0
- data/plugins/providers/hyperv/scripts/dismount_vhd.ps1 +16 -0
- data/plugins/providers/hyperv/scripts/export_vm.ps1 +32 -0
- data/plugins/providers/hyperv/scripts/file_sync.ps1 +123 -0
- data/plugins/providers/hyperv/scripts/get_network_config.ps1 +68 -0
- data/plugins/providers/hyperv/scripts/get_network_mac.ps1 +35 -0
- data/plugins/providers/hyperv/scripts/get_scsi_controller.ps1 +19 -0
- data/plugins/providers/hyperv/scripts/get_switches.ps1 +13 -0
- data/plugins/providers/hyperv/scripts/get_vhd.ps1 +19 -0
- data/plugins/providers/hyperv/scripts/get_vm_status.ps1 +52 -0
- data/plugins/providers/hyperv/scripts/has_vmcx_support.ps1 +12 -0
- data/plugins/providers/hyperv/scripts/import_vm.ps1 +40 -0
- data/plugins/providers/hyperv/scripts/list_hdds.ps1 +20 -0
- data/plugins/providers/hyperv/scripts/list_snapshots.ps1 +22 -0
- data/plugins/providers/hyperv/scripts/new_vhd.ps1 +34 -0
- data/plugins/providers/hyperv/scripts/remove_disk_drive.ps1 +28 -0
- data/plugins/providers/hyperv/scripts/remove_dvd.ps1 +21 -0
- data/plugins/providers/hyperv/scripts/resize_disk_drive.ps1 +21 -0
- data/plugins/providers/hyperv/scripts/restore_snapshot.ps1 +20 -0
- data/plugins/providers/hyperv/scripts/resume_vm.ps1 +19 -0
- data/plugins/providers/hyperv/scripts/set_enhanced_session_transport_type.ps1 +36 -0
- data/plugins/providers/hyperv/scripts/set_name.ps1 +27 -0
- data/plugins/providers/hyperv/scripts/set_network_mac.ps1 +21 -0
- data/plugins/providers/hyperv/scripts/set_network_vlan.ps1 +19 -0
- data/plugins/providers/hyperv/scripts/set_vm_integration_services.ps1 +30 -0
- data/plugins/providers/hyperv/scripts/start_vm.ps1 +29 -0
- data/plugins/providers/hyperv/scripts/stop_vm.ps1 +20 -0
- data/plugins/providers/hyperv/scripts/suspend_vm.ps1 +19 -0
- data/plugins/providers/hyperv/scripts/utils/VagrantMessages/VagrantMessages.psm1 +27 -0
- data/plugins/providers/hyperv/scripts/utils/VagrantVM/VagrantVM.psm1 +776 -0
- data/plugins/providers/virtualbox/action/boot.rb +26 -0
- data/plugins/providers/virtualbox/action/check_accessible.rb +26 -0
- data/plugins/providers/virtualbox/action/check_created.rb +24 -0
- data/plugins/providers/virtualbox/action/check_guest_additions.rb +58 -0
- data/plugins/providers/virtualbox/action/check_running.rb +24 -0
- data/plugins/providers/virtualbox/action/check_virtualbox.rb +28 -0
- data/plugins/providers/virtualbox/action/clean_machine_folder.rb +55 -0
- data/plugins/providers/virtualbox/action/clear_forwarded_ports.rb +23 -0
- data/plugins/providers/virtualbox/action/clear_network_interfaces.rb +34 -0
- data/plugins/providers/virtualbox/action/created.rb +23 -0
- data/plugins/providers/virtualbox/action/customize.rb +48 -0
- data/plugins/providers/virtualbox/action/destroy.rb +22 -0
- data/plugins/providers/virtualbox/action/destroy_unused_network_interfaces.rb +26 -0
- data/plugins/providers/virtualbox/action/discard_state.rb +23 -0
- data/plugins/providers/virtualbox/action/export.rb +54 -0
- data/plugins/providers/virtualbox/action/forced_halt.rb +28 -0
- data/plugins/providers/virtualbox/action/forward_ports.rb +92 -0
- data/plugins/providers/virtualbox/action/import.rb +110 -0
- data/plugins/providers/virtualbox/action/import_master.rb +83 -0
- data/plugins/providers/virtualbox/action/is_paused.rb +23 -0
- data/plugins/providers/virtualbox/action/is_running.rb +23 -0
- data/plugins/providers/virtualbox/action/is_saved.rb +23 -0
- data/plugins/providers/virtualbox/action/match_mac_address.rb +30 -0
- data/plugins/providers/virtualbox/action/message_already_running.rb +19 -0
- data/plugins/providers/virtualbox/action/message_not_created.rb +19 -0
- data/plugins/providers/virtualbox/action/message_not_running.rb +19 -0
- data/plugins/providers/virtualbox/action/message_will_not_destroy.rb +20 -0
- data/plugins/providers/virtualbox/action/network.rb +638 -0
- data/plugins/providers/virtualbox/action/network_fix_ipv6.rb +87 -0
- data/plugins/providers/virtualbox/action/package.rb +19 -0
- data/plugins/providers/virtualbox/action/package_setup_files.rb +19 -0
- data/plugins/providers/virtualbox/action/package_setup_folders.rb +21 -0
- data/plugins/providers/virtualbox/action/package_vagrantfile.rb +36 -0
- data/plugins/providers/virtualbox/action/prepare_clone_snapshot.rb +69 -0
- data/plugins/providers/virtualbox/action/prepare_forwarded_port_collision_params.rb +38 -0
- data/plugins/providers/virtualbox/action/prepare_nfs_settings.rb +162 -0
- data/plugins/providers/virtualbox/action/prepare_nfs_valid_ids.rb +20 -0
- data/plugins/providers/virtualbox/action/resume.rb +28 -0
- data/plugins/providers/virtualbox/action/sane_defaults.rb +92 -0
- data/plugins/providers/virtualbox/action/set_default_nic_type.rb +72 -0
- data/plugins/providers/virtualbox/action/set_name.rb +58 -0
- data/plugins/providers/virtualbox/action/setup_package_files.rb +20 -0
- data/plugins/providers/virtualbox/action/snapshot_delete.rb +37 -0
- data/plugins/providers/virtualbox/action/snapshot_restore.rb +33 -0
- data/plugins/providers/virtualbox/action/snapshot_save.rb +28 -0
- data/plugins/providers/virtualbox/action/suspend.rb +23 -0
- data/plugins/providers/virtualbox/action.rb +433 -0
- data/plugins/providers/virtualbox/cap/cleanup_disks.rb +86 -0
- data/plugins/providers/virtualbox/cap/configure_disks.rb +441 -0
- data/plugins/providers/virtualbox/cap/mount_options.rb +43 -0
- data/plugins/providers/virtualbox/cap/public_address.rb +18 -0
- data/plugins/providers/virtualbox/cap/validate_disk_ext.rb +37 -0
- data/plugins/providers/virtualbox/cap.rb +40 -0
- data/plugins/providers/virtualbox/config.rb +211 -0
- data/plugins/providers/virtualbox/driver/base.rb +530 -0
- data/plugins/providers/virtualbox/driver/meta.rb +212 -0
- data/plugins/providers/virtualbox/driver/version_4_0.rb +574 -0
- data/plugins/providers/virtualbox/driver/version_4_1.rb +699 -0
- data/plugins/providers/virtualbox/driver/version_4_2.rb +713 -0
- data/plugins/providers/virtualbox/driver/version_4_3.rb +757 -0
- data/plugins/providers/virtualbox/driver/version_5_0.rb +1022 -0
- data/plugins/providers/virtualbox/driver/version_5_1.rb +19 -0
- data/plugins/providers/virtualbox/driver/version_5_2.rb +19 -0
- data/plugins/providers/virtualbox/driver/version_6_0.rb +105 -0
- data/plugins/providers/virtualbox/driver/version_6_1.rb +42 -0
- data/plugins/providers/virtualbox/driver/version_7_0.rb +306 -0
- data/plugins/providers/virtualbox/driver/version_7_1.rb +19 -0
- data/plugins/providers/virtualbox/model/forwarded_port.rb +73 -0
- data/plugins/providers/virtualbox/model/storage_controller.rb +138 -0
- data/plugins/providers/virtualbox/model/storage_controller_array.rb +101 -0
- data/plugins/providers/virtualbox/plugin.rb +120 -0
- data/plugins/providers/virtualbox/provider.rb +133 -0
- data/plugins/providers/virtualbox/synced_folder.rb +153 -0
- data/plugins/providers/virtualbox/util/compile_forwarded_ports.rb +40 -0
- data/plugins/provisioners/ansible/cap/guest/alpine/ansible_install.rb +47 -0
- data/plugins/provisioners/ansible/cap/guest/arch/ansible_install.rb +44 -0
- data/plugins/provisioners/ansible/cap/guest/debian/ansible_install.rb +56 -0
- data/plugins/provisioners/ansible/cap/guest/facts.rb +27 -0
- data/plugins/provisioners/ansible/cap/guest/fedora/ansible_install.rb +43 -0
- data/plugins/provisioners/ansible/cap/guest/freebsd/ansible_install.rb +26 -0
- data/plugins/provisioners/ansible/cap/guest/pip/pip.rb +49 -0
- data/plugins/provisioners/ansible/cap/guest/posix/ansible_installed.rb +28 -0
- data/plugins/provisioners/ansible/cap/guest/redhat/ansible_install.rb +75 -0
- data/plugins/provisioners/ansible/cap/guest/suse/ansible_install.rb +26 -0
- data/plugins/provisioners/ansible/cap/guest/ubuntu/ansible_install.rb +42 -0
- data/plugins/provisioners/ansible/config/base.rb +157 -0
- data/plugins/provisioners/ansible/config/guest.rb +59 -0
- data/plugins/provisioners/ansible/config/host.rb +66 -0
- data/plugins/provisioners/ansible/constants.rb +17 -0
- data/plugins/provisioners/ansible/errors.rb +43 -0
- data/plugins/provisioners/ansible/helpers.rb +20 -0
- data/plugins/provisioners/ansible/plugin.rb +88 -0
- data/plugins/provisioners/ansible/provisioner/base.rb +405 -0
- data/plugins/provisioners/ansible/provisioner/guest.rb +197 -0
- data/plugins/provisioners/ansible/provisioner/host.rb +352 -0
- data/plugins/provisioners/cfengine/cap/debian/cfengine_install.rb +24 -0
- data/plugins/provisioners/cfengine/cap/linux/cfengine_installed.rb +17 -0
- data/plugins/provisioners/cfengine/cap/linux/cfengine_needs_bootstrap.rb +37 -0
- data/plugins/provisioners/cfengine/cap/redhat/cfengine_install.rb +37 -0
- data/plugins/provisioners/cfengine/cap/suse/cfengine_install.rb +21 -0
- data/plugins/provisioners/cfengine/config.rb +127 -0
- data/plugins/provisioners/cfengine/plugin.rb +50 -0
- data/plugins/provisioners/cfengine/provisioner.rb +142 -0
- data/plugins/provisioners/chef/cap/debian/chef_install.rb +22 -0
- data/plugins/provisioners/chef/cap/freebsd/chef_install.rb +21 -0
- data/plugins/provisioners/chef/cap/freebsd/chef_installed.rb +27 -0
- data/plugins/provisioners/chef/cap/linux/chef_installed.rb +27 -0
- data/plugins/provisioners/chef/cap/omnios/chef_install.rb +23 -0
- data/plugins/provisioners/chef/cap/omnios/chef_installed.rb +28 -0
- data/plugins/provisioners/chef/cap/redhat/chef_install.rb +27 -0
- data/plugins/provisioners/chef/cap/suse/chef_install.rb +30 -0
- data/plugins/provisioners/chef/cap/windows/chef_install.rb +19 -0
- data/plugins/provisioners/chef/cap/windows/chef_installed.rb +24 -0
- data/plugins/provisioners/chef/command_builder.rb +87 -0
- data/plugins/provisioners/chef/config/base.rb +139 -0
- data/plugins/provisioners/chef/config/base_runner.rb +131 -0
- data/plugins/provisioners/chef/config/chef_apply.rb +53 -0
- data/plugins/provisioners/chef/config/chef_client.rb +77 -0
- data/plugins/provisioners/chef/config/chef_solo.rb +141 -0
- data/plugins/provisioners/chef/config/chef_zero.rb +133 -0
- data/plugins/provisioners/chef/installer.rb +51 -0
- data/plugins/provisioners/chef/omnibus.rb +40 -0
- data/plugins/provisioners/chef/plugin.rb +108 -0
- data/plugins/provisioners/chef/provisioner/base.rb +258 -0
- data/plugins/provisioners/chef/provisioner/chef_apply.rb +74 -0
- data/plugins/provisioners/chef/provisioner/chef_client.rb +179 -0
- data/plugins/provisioners/chef/provisioner/chef_solo.rb +244 -0
- data/plugins/provisioners/chef/provisioner/chef_zero.rb +123 -0
- data/plugins/provisioners/container/client.rb +206 -0
- data/plugins/provisioners/container/config.rb +86 -0
- data/plugins/provisioners/container/installer.rb +16 -0
- data/plugins/provisioners/container/plugin.rb +26 -0
- data/plugins/provisioners/container/provisioner.rb +31 -0
- data/plugins/provisioners/docker/cap/centos/docker_install.rb +44 -0
- data/plugins/provisioners/docker/cap/centos/docker_start_service.rb +27 -0
- data/plugins/provisioners/docker/cap/debian/docker_install.rb +21 -0
- data/plugins/provisioners/docker/cap/debian/docker_start_service.rb +16 -0
- data/plugins/provisioners/docker/cap/fedora/docker_install.rb +30 -0
- data/plugins/provisioners/docker/cap/linux/docker_configure_vagrant_user.rb +23 -0
- data/plugins/provisioners/docker/cap/linux/docker_daemon_running.rb +16 -0
- data/plugins/provisioners/docker/cap/linux/docker_installed.rb +29 -0
- data/plugins/provisioners/docker/cap/windows/docker_daemon_running.rb +16 -0
- data/plugins/provisioners/docker/client.rb +26 -0
- data/plugins/provisioners/docker/config.rb +19 -0
- data/plugins/provisioners/docker/installer.rb +37 -0
- data/plugins/provisioners/docker/plugin.rb +71 -0
- data/plugins/provisioners/docker/provisioner.rb +59 -0
- data/plugins/provisioners/file/config.rb +32 -0
- data/plugins/provisioners/file/plugin.rb +26 -0
- data/plugins/provisioners/file/provisioner.rb +46 -0
- data/plugins/provisioners/podman/cap/centos/podman_install.rb +38 -0
- data/plugins/provisioners/podman/cap/linux/podman_installed.rb +16 -0
- data/plugins/provisioners/podman/cap/redhat/podman_install.rb +29 -0
- data/plugins/provisioners/podman/client.rb +15 -0
- data/plugins/provisioners/podman/config.rb +31 -0
- data/plugins/provisioners/podman/installer.rb +36 -0
- data/plugins/provisioners/podman/plugin.rb +41 -0
- data/plugins/provisioners/podman/provisioner.rb +55 -0
- data/plugins/provisioners/puppet/config/puppet.rb +178 -0
- data/plugins/provisioners/puppet/config/puppet_server.rb +84 -0
- data/plugins/provisioners/puppet/plugin.rb +36 -0
- data/plugins/provisioners/puppet/provisioner/puppet.rb +336 -0
- data/plugins/provisioners/puppet/provisioner/puppet_server.rb +114 -0
- data/plugins/provisioners/salt/bootstrap_downloader.rb +62 -0
- data/plugins/provisioners/salt/config.rb +194 -0
- data/plugins/provisioners/salt/errors.rb +18 -0
- data/plugins/provisioners/salt/plugin.rb +25 -0
- data/plugins/provisioners/salt/provisioner.rb +499 -0
- data/plugins/provisioners/shell/config.rb +146 -0
- data/plugins/provisioners/shell/plugin.rb +26 -0
- data/plugins/provisioners/shell/provisioner.rb +368 -0
- data/plugins/pushes/atlas/config.rb +151 -0
- data/plugins/pushes/atlas/errors.rb +16 -0
- data/plugins/pushes/atlas/locales/en.yml +25 -0
- data/plugins/pushes/atlas/plugin.rb +38 -0
- data/plugins/pushes/atlas/push.rb +87 -0
- data/plugins/pushes/ftp/adapter.rb +147 -0
- data/plugins/pushes/ftp/config.rb +133 -0
- data/plugins/pushes/ftp/errors.rb +16 -0
- data/plugins/pushes/ftp/locales/en.yml +19 -0
- data/plugins/pushes/ftp/plugin.rb +36 -0
- data/plugins/pushes/ftp/push.rb +137 -0
- data/plugins/pushes/heroku/config.rb +77 -0
- data/plugins/pushes/heroku/errors.rb +24 -0
- data/plugins/pushes/heroku/locales/en.yml +33 -0
- data/plugins/pushes/heroku/plugin.rb +36 -0
- data/plugins/pushes/heroku/push.rb +147 -0
- data/plugins/pushes/local-exec/config.rb +80 -0
- data/plugins/pushes/local-exec/errors.rb +16 -0
- data/plugins/pushes/local-exec/locales/en.yml +26 -0
- data/plugins/pushes/local-exec/plugin.rb +36 -0
- data/plugins/pushes/local-exec/push.rb +91 -0
- data/plugins/pushes/noop/config.rb +19 -0
- data/plugins/pushes/noop/plugin.rb +25 -0
- data/plugins/pushes/noop/push.rb +12 -0
- data/plugins/synced_folders/nfs/action_cleanup.rb +32 -0
- data/plugins/synced_folders/nfs/config.rb +35 -0
- data/plugins/synced_folders/nfs/plugin.rb +49 -0
- data/plugins/synced_folders/nfs/synced_folder.rb +171 -0
- data/plugins/synced_folders/rsync/command/rsync.rb +81 -0
- data/plugins/synced_folders/rsync/command/rsync_auto.rb +244 -0
- data/plugins/synced_folders/rsync/default_unix_cap.rb +49 -0
- data/plugins/synced_folders/rsync/helper.rb +296 -0
- data/plugins/synced_folders/rsync/plugin.rb +31 -0
- data/plugins/synced_folders/rsync/synced_folder.rb +62 -0
- data/plugins/synced_folders/smb/cap/default_fstab_modification.rb +14 -0
- data/plugins/synced_folders/smb/cap/mount_options.rb +59 -0
- data/plugins/synced_folders/smb/config.rb +26 -0
- data/plugins/synced_folders/smb/errors.rb +65 -0
- data/plugins/synced_folders/smb/plugin.rb +60 -0
- data/plugins/synced_folders/smb/synced_folder.rb +189 -0
- data/plugins/synced_folders/unix_mount_helpers.rb +122 -0
- data/scripts/install_rvm +19 -0
- data/scripts/setup_tests +49 -0
- data/scripts/sign.sh +29 -0
- data/scripts/website_push_www.sh +43 -0
- data/tasks/acceptance.rake +22 -0
- data/tasks/bundler.rake +3 -0
- data/tasks/test.rake +8 -0
- data/templates/commands/init/Vagrantfile.erb +86 -0
- data/templates/commands/init/Vagrantfile.min.erb +12 -0
- data/templates/commands/ssh_config/config.erb +42 -0
- data/templates/commands/winrm_config/config.erb +11 -0
- data/templates/config/messages.erb +14 -0
- data/templates/config/validation_failed.erb +7 -0
- data/templates/guests/alpine/network_dhcp.erb +13 -0
- data/templates/guests/alpine/network_static.erb +7 -0
- data/templates/guests/alt/network_dhcp.erb +7 -0
- data/templates/guests/alt/network_ipv4address.erb +3 -0
- data/templates/guests/alt/network_ipv4route.erb +5 -0
- data/templates/guests/alt/network_static.erb +7 -0
- data/templates/guests/arch/default_network/network_dhcp.erb +4 -0
- data/templates/guests/arch/default_network/network_static.erb +8 -0
- data/templates/guests/arch/default_network/network_static6.erb +8 -0
- data/templates/guests/arch/systemd_networkd/network_dhcp.erb +6 -0
- data/templates/guests/arch/systemd_networkd/network_static.erb +9 -0
- data/templates/guests/arch/systemd_networkd/network_static6.erb +9 -0
- data/templates/guests/coreos/etcd.service.erb +10 -0
- data/templates/guests/debian/network_dhcp.erb +13 -0
- data/templates/guests/debian/network_static.erb +10 -0
- data/templates/guests/debian/network_static6.erb +10 -0
- data/templates/guests/freebsd/network_dhcp.erb +4 -0
- data/templates/guests/freebsd/network_static.erb +6 -0
- data/templates/guests/freebsd/network_static6.erb +6 -0
- data/templates/guests/funtoo/network_dhcp.erb +4 -0
- data/templates/guests/funtoo/network_static.erb +10 -0
- data/templates/guests/funtoo/network_static6.erb +9 -0
- data/templates/guests/gentoo/network_dhcp.erb +4 -0
- data/templates/guests/gentoo/network_static.erb +8 -0
- data/templates/guests/gentoo/network_static6.erb +8 -0
- data/templates/guests/gentoo/network_systemd.erb +16 -0
- data/templates/guests/linux/etc_fstab.erb +6 -0
- data/templates/guests/netbsd/network_dhcp.erb +3 -0
- data/templates/guests/netbsd/network_static.erb +3 -0
- data/templates/guests/nixos/hostname.erb +6 -0
- data/templates/guests/nixos/network.erb +15 -0
- data/templates/guests/openbsd/network_dhcp.erb +1 -0
- data/templates/guests/openbsd/network_static.erb +1 -0
- data/templates/guests/openbsd/network_static6.erb +1 -0
- data/templates/guests/redhat/network_dhcp.erb +7 -0
- data/templates/guests/redhat/network_static.erb +16 -0
- data/templates/guests/redhat/network_static6.erb +12 -0
- data/templates/guests/slackware/network_dhcp.erb +11 -0
- data/templates/guests/slackware/network_static.erb +13 -0
- data/templates/guests/suse/network_dhcp.erb +6 -0
- data/templates/guests/suse/network_static.erb +13 -0
- data/templates/guests/suse/network_static6.erb +16 -0
- data/templates/license/license.html.tmpl +127 -0
- data/templates/license/license.rtf.tmpl +0 -0
- data/templates/license/license.tmpl +92 -0
- data/templates/locales/comm_winrm.yml +85 -0
- data/templates/locales/command_ps.yml +35 -0
- data/templates/locales/command_rdp.yml +28 -0
- data/templates/locales/en.yml +3149 -0
- data/templates/locales/guest_windows.yml +26 -0
- data/templates/locales/providers_docker.yml +321 -0
- data/templates/locales/providers_hyperv.yml +111 -0
- data/templates/locales/synced_folder_smb.yml +98 -0
- data/templates/networking/network_manager/network_manager_device.erb +41 -0
- data/templates/nfs/exports_bsd.erb +5 -0
- data/templates/nfs/exports_darwin.erb +7 -0
- data/templates/nfs/exports_linux.erb +7 -0
- data/templates/package_Vagrantfile.erb +11 -0
- data/templates/provisioners/chef_client/client.erb +41 -0
- data/templates/provisioners/chef_solo/solo.erb +52 -0
- data/templates/provisioners/chef_zero/zero.erb +45 -0
- data/templates/rgloader.rb +12 -0
- data/vagrant-spec.config.example.rb +13 -0
- data/vagrant.gemspec +113 -20
- data/version.txt +1 -0
- metadata +1621 -43
- data/LICENSE.txt +0 -22
- data/message.txt +0 -17
@@ -0,0 +1,1062 @@
|
|
1
|
+
# Copyright (c) HashiCorp, Inc.
|
2
|
+
# SPDX-License-Identifier: BUSL-1.1
|
3
|
+
|
4
|
+
require "pathname"
|
5
|
+
require "securerandom"
|
6
|
+
require "set"
|
7
|
+
|
8
|
+
require "vagrant"
|
9
|
+
require "vagrant/action/builtin/mixin_synced_folders"
|
10
|
+
require "vagrant/config/v2/util"
|
11
|
+
require "vagrant/util/platform"
|
12
|
+
require "vagrant/util/presence"
|
13
|
+
require "vagrant/util/experimental"
|
14
|
+
require "vagrant/util/map_command_options"
|
15
|
+
|
16
|
+
require File.expand_path("../vm_provisioner", __FILE__)
|
17
|
+
require File.expand_path("../vm_subvm", __FILE__)
|
18
|
+
require File.expand_path("../disk", __FILE__)
|
19
|
+
require File.expand_path("../cloud_init", __FILE__)
|
20
|
+
|
21
|
+
module VagrantPlugins
|
22
|
+
module Kernel_V2
|
23
|
+
class VMConfig < Vagrant.plugin("2", :config)
|
24
|
+
include Vagrant::Util::Presence
|
25
|
+
|
26
|
+
DEFAULT_VM_NAME = :default
|
27
|
+
|
28
|
+
attr_accessor :allowed_synced_folder_types
|
29
|
+
attr_accessor :allow_fstab_modification
|
30
|
+
attr_accessor :allow_hosts_modification
|
31
|
+
attr_accessor :base_mac
|
32
|
+
attr_accessor :base_address
|
33
|
+
attr_accessor :boot_timeout
|
34
|
+
attr_accessor :box
|
35
|
+
attr_accessor :box_architecture
|
36
|
+
attr_accessor :ignore_box_vagrantfile
|
37
|
+
attr_accessor :box_check_update
|
38
|
+
attr_accessor :box_url
|
39
|
+
attr_accessor :box_server_url
|
40
|
+
attr_accessor :box_version
|
41
|
+
attr_accessor :box_download_ca_cert
|
42
|
+
attr_accessor :box_download_ca_path
|
43
|
+
attr_accessor :box_download_checksum
|
44
|
+
attr_accessor :box_download_checksum_type
|
45
|
+
attr_accessor :box_download_client_cert
|
46
|
+
attr_accessor :box_download_disable_ssl_revoke_best_effort
|
47
|
+
attr_accessor :box_download_insecure
|
48
|
+
attr_accessor :box_download_location_trusted
|
49
|
+
attr_accessor :box_download_options
|
50
|
+
attr_accessor :communicator
|
51
|
+
attr_accessor :graceful_halt_timeout
|
52
|
+
attr_accessor :guest
|
53
|
+
attr_accessor :hostname
|
54
|
+
attr_accessor :post_up_message
|
55
|
+
attr_accessor :usable_port_range
|
56
|
+
attr_reader :provisioners
|
57
|
+
attr_reader :disks
|
58
|
+
attr_reader :cloud_init_configs
|
59
|
+
attr_reader :box_extra_download_options
|
60
|
+
|
61
|
+
# This is an experimental feature that isn't public yet.
|
62
|
+
attr_accessor :clone
|
63
|
+
|
64
|
+
def initialize
|
65
|
+
@logger = Log4r::Logger.new("vagrant::config::vm")
|
66
|
+
|
67
|
+
@allowed_synced_folder_types = UNSET_VALUE
|
68
|
+
@allow_fstab_modification = UNSET_VALUE
|
69
|
+
@base_mac = UNSET_VALUE
|
70
|
+
@base_address = UNSET_VALUE
|
71
|
+
@boot_timeout = UNSET_VALUE
|
72
|
+
@box = UNSET_VALUE
|
73
|
+
@box_architecture = UNSET_VALUE
|
74
|
+
@ignore_box_vagrantfile = UNSET_VALUE
|
75
|
+
@box_check_update = UNSET_VALUE
|
76
|
+
@box_download_ca_cert = UNSET_VALUE
|
77
|
+
@box_download_ca_path = UNSET_VALUE
|
78
|
+
@box_download_checksum = UNSET_VALUE
|
79
|
+
@box_download_checksum_type = UNSET_VALUE
|
80
|
+
@box_download_client_cert = UNSET_VALUE
|
81
|
+
@box_download_disable_ssl_revoke_best_effort = UNSET_VALUE
|
82
|
+
@box_download_insecure = UNSET_VALUE
|
83
|
+
@box_download_location_trusted = UNSET_VALUE
|
84
|
+
@box_download_options = UNSET_VALUE
|
85
|
+
@box_extra_download_options = UNSET_VALUE
|
86
|
+
@box_url = UNSET_VALUE
|
87
|
+
@box_version = UNSET_VALUE
|
88
|
+
@allow_hosts_modification = UNSET_VALUE
|
89
|
+
@clone = UNSET_VALUE
|
90
|
+
@communicator = UNSET_VALUE
|
91
|
+
@graceful_halt_timeout = UNSET_VALUE
|
92
|
+
@guest = UNSET_VALUE
|
93
|
+
@hostname = UNSET_VALUE
|
94
|
+
@post_up_message = UNSET_VALUE
|
95
|
+
@provisioners = []
|
96
|
+
@disks = []
|
97
|
+
@cloud_init_configs = []
|
98
|
+
@usable_port_range = UNSET_VALUE
|
99
|
+
|
100
|
+
# Internal state
|
101
|
+
@__compiled_provider_configs = {}
|
102
|
+
@__defined_vm_keys = []
|
103
|
+
@__defined_vms = {}
|
104
|
+
@__finalized = false
|
105
|
+
@__networks = {}
|
106
|
+
@__providers = {}
|
107
|
+
@__provider_order = []
|
108
|
+
@__provider_overrides = {}
|
109
|
+
@__synced_folders = {}
|
110
|
+
end
|
111
|
+
|
112
|
+
# This was from V1, but we just kept it here as an alias for hostname
|
113
|
+
# because too many people mess this up.
|
114
|
+
def host_name=(value)
|
115
|
+
@hostname = value
|
116
|
+
end
|
117
|
+
|
118
|
+
# Custom merge method since some keys here are merged differently.
|
119
|
+
def merge(other)
|
120
|
+
super.tap do |result|
|
121
|
+
other_networks = other.instance_variable_get(:@__networks)
|
122
|
+
|
123
|
+
result.instance_variable_set(:@__networks, @__networks.merge(other_networks))
|
124
|
+
|
125
|
+
# Merge defined VMs by first merging the defined VM keys,
|
126
|
+
# preserving the order in which they were defined.
|
127
|
+
other_defined_vm_keys = other.instance_variable_get(:@__defined_vm_keys)
|
128
|
+
other_defined_vm_keys -= @__defined_vm_keys
|
129
|
+
new_defined_vm_keys = @__defined_vm_keys + other_defined_vm_keys
|
130
|
+
|
131
|
+
# Merge the actual defined VMs.
|
132
|
+
other_defined_vms = other.instance_variable_get(:@__defined_vms)
|
133
|
+
new_defined_vms = {}
|
134
|
+
|
135
|
+
@__defined_vms.each do |key, subvm|
|
136
|
+
new_defined_vms[key] = subvm.clone
|
137
|
+
end
|
138
|
+
|
139
|
+
other_defined_vms.each do |key, subvm|
|
140
|
+
if !new_defined_vms.key?(key)
|
141
|
+
new_defined_vms[key] = subvm.clone
|
142
|
+
else
|
143
|
+
new_defined_vms[key].config_procs.concat(subvm.config_procs)
|
144
|
+
new_defined_vms[key].options.merge!(subvm.options)
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
# Merge defined disks
|
149
|
+
other_disks = other.instance_variable_get(:@disks)
|
150
|
+
new_disks = []
|
151
|
+
@disks.each do |p|
|
152
|
+
other_p = other_disks.find { |o| p.id == o.id }
|
153
|
+
if other_p
|
154
|
+
# there is an override. take it.
|
155
|
+
other_p.config = p.config.merge(other_p.config)
|
156
|
+
|
157
|
+
# Remove duplicate disk config from other
|
158
|
+
p = other_p
|
159
|
+
other_disks.delete(other_p)
|
160
|
+
end
|
161
|
+
|
162
|
+
# there is an override, merge it into the
|
163
|
+
new_disks << p.dup
|
164
|
+
end
|
165
|
+
other_disks.each do |p|
|
166
|
+
new_disks << p.dup
|
167
|
+
end
|
168
|
+
result.instance_variable_set(:@disks, new_disks)
|
169
|
+
|
170
|
+
# Merge defined cloud_init_configs
|
171
|
+
other_cloud_init_configs = other.instance_variable_get(:@cloud_init_configs)
|
172
|
+
new_cloud_init_configs = []
|
173
|
+
@cloud_init_configs.each do |p|
|
174
|
+
other_p = other_cloud_init_configs.find { |o| p.id == o.id }
|
175
|
+
if other_p
|
176
|
+
# there is an override. take it.
|
177
|
+
other_p.config = p.config.merge(other_p.config)
|
178
|
+
|
179
|
+
# Remove duplicate disk config from other
|
180
|
+
p = other_p
|
181
|
+
other_cloud_init_configs.delete(other_p)
|
182
|
+
end
|
183
|
+
|
184
|
+
# there is an override, merge it into the
|
185
|
+
new_cloud_init_configs << p.dup
|
186
|
+
end
|
187
|
+
other_cloud_init_configs.each do |p|
|
188
|
+
new_cloud_init_configs << p.dup
|
189
|
+
end
|
190
|
+
result.instance_variable_set(:@cloud_init_configs, new_cloud_init_configs)
|
191
|
+
|
192
|
+
# Merge the providers by prepending any configuration blocks we
|
193
|
+
# have for providers onto the new configuration.
|
194
|
+
other_providers = other.instance_variable_get(:@__providers)
|
195
|
+
new_providers = @__providers.dup
|
196
|
+
other_providers.each do |key, blocks|
|
197
|
+
new_providers[key] ||= []
|
198
|
+
new_providers[key] += blocks
|
199
|
+
end
|
200
|
+
|
201
|
+
# Merge the provider ordering. Anything defined in our CURRENT
|
202
|
+
# scope is before anything else.
|
203
|
+
other_order = other.instance_variable_get(:@__provider_order)
|
204
|
+
new_order = @__provider_order.dup
|
205
|
+
new_order = (new_order + other_order).uniq
|
206
|
+
|
207
|
+
# Merge the provider overrides by appending them...
|
208
|
+
other_overrides = other.instance_variable_get(:@__provider_overrides)
|
209
|
+
new_overrides = @__provider_overrides.dup
|
210
|
+
other_overrides.each do |key, blocks|
|
211
|
+
new_overrides[key] ||= []
|
212
|
+
new_overrides[key] += blocks
|
213
|
+
end
|
214
|
+
|
215
|
+
# Merge provisioners. First we deal with overrides and making
|
216
|
+
# sure the ordering is good there. Then we merge them.
|
217
|
+
new_provs = []
|
218
|
+
other_provs = other.provisioners.dup
|
219
|
+
@provisioners.each do |p|
|
220
|
+
other_p = other_provs.find { |o| p.id == o.id }
|
221
|
+
if other_p
|
222
|
+
# There is an override. Take it.
|
223
|
+
other_p.config = p.config.merge(other_p.config)
|
224
|
+
other_p.run ||= p.run
|
225
|
+
next if !other_p.preserve_order
|
226
|
+
|
227
|
+
# We're preserving order, delete from other
|
228
|
+
p = other_p
|
229
|
+
other_provs.delete(other_p)
|
230
|
+
end
|
231
|
+
|
232
|
+
# There is an override, merge it into the
|
233
|
+
new_provs << p.dup
|
234
|
+
end
|
235
|
+
other_provs.each do |p|
|
236
|
+
new_provs << p.dup
|
237
|
+
end
|
238
|
+
result.instance_variable_set(:@provisioners, new_provs)
|
239
|
+
|
240
|
+
# Merge synced folders.
|
241
|
+
other_folders = other.instance_variable_get(:@__synced_folders)
|
242
|
+
new_folders = {}
|
243
|
+
@__synced_folders.each do |key, value|
|
244
|
+
new_folders[key] = value.dup
|
245
|
+
end
|
246
|
+
|
247
|
+
other_folders.each do |id, options|
|
248
|
+
new_folders[id] ||= {}
|
249
|
+
new_folders[id].merge!(options)
|
250
|
+
end
|
251
|
+
|
252
|
+
result.instance_variable_set(:@__defined_vm_keys, new_defined_vm_keys)
|
253
|
+
result.instance_variable_set(:@__defined_vms, new_defined_vms)
|
254
|
+
result.instance_variable_set(:@__providers, new_providers)
|
255
|
+
result.instance_variable_set(:@__provider_order, new_order)
|
256
|
+
result.instance_variable_set(:@__provider_overrides, new_overrides)
|
257
|
+
result.instance_variable_set(:@__synced_folders, new_folders)
|
258
|
+
end
|
259
|
+
end
|
260
|
+
|
261
|
+
# Defines a synced folder pair. This pair of folders will be synced
|
262
|
+
# to/from the machine. Note that if the machine you're using doesn't
|
263
|
+
# support multi-directional syncing (perhaps an rsync backed synced
|
264
|
+
# folder) then the host is always synced to the guest but guest data
|
265
|
+
# may not be synced back to the host.
|
266
|
+
#
|
267
|
+
# @param [String] hostpath Path to the host folder to share. If this
|
268
|
+
# is a relative path, it is relative to the location of the
|
269
|
+
# Vagrantfile.
|
270
|
+
# @param [String] guestpath Path on the guest to mount the shared
|
271
|
+
# folder.
|
272
|
+
# @param [Hash] options Additional options.
|
273
|
+
def synced_folder(hostpath, guestpath, options=nil)
|
274
|
+
if Vagrant::Util::Platform.windows?
|
275
|
+
# On Windows, Ruby just uses normal '/' for path seps, so
|
276
|
+
# just replace normal Windows style seps with Unix ones.
|
277
|
+
hostpath = hostpath.to_s.gsub("\\", "/")
|
278
|
+
end
|
279
|
+
|
280
|
+
if guestpath.is_a?(Hash)
|
281
|
+
options = guestpath
|
282
|
+
guestpath = nil
|
283
|
+
end
|
284
|
+
|
285
|
+
options ||= {}
|
286
|
+
|
287
|
+
if options[:nfs]
|
288
|
+
options[:type] = :nfs
|
289
|
+
options.delete(:nfs)
|
290
|
+
end
|
291
|
+
|
292
|
+
if options.has_key?(:name)
|
293
|
+
synced_folder_name = options.delete(:name)
|
294
|
+
else
|
295
|
+
synced_folder_name = guestpath
|
296
|
+
end
|
297
|
+
|
298
|
+
options[:guestpath] = guestpath.to_s.gsub(/\/$/, '') if guestpath
|
299
|
+
options[:hostpath] = hostpath
|
300
|
+
options[:disabled] = false if !options.key?(:disabled)
|
301
|
+
options = (@__synced_folders[options[:guestpath]] || {}).
|
302
|
+
merge(options.dup)
|
303
|
+
|
304
|
+
# Make sure the type is a symbol
|
305
|
+
options[:type] = options[:type].to_sym if options[:type]
|
306
|
+
|
307
|
+
@__synced_folders[synced_folder_name] = options
|
308
|
+
end
|
309
|
+
|
310
|
+
# Define a way to access the machine via a network. This exposes a
|
311
|
+
# high-level abstraction for networking that may not directly map
|
312
|
+
# 1-to-1 for every provider. For example, AWS has no equivalent to
|
313
|
+
# "port forwarding." But most providers will attempt to implement this
|
314
|
+
# in a way that behaves similarly.
|
315
|
+
#
|
316
|
+
# `type` can be one of:
|
317
|
+
#
|
318
|
+
# * `:forwarded_port` - A port that is accessible via localhost
|
319
|
+
# that forwards into the machine.
|
320
|
+
# * `:private_network` - The machine gets an IP that is not directly
|
321
|
+
# publicly accessible, but ideally accessible from this machine.
|
322
|
+
# * `:public_network` - The machine gets an IP on a shared network.
|
323
|
+
#
|
324
|
+
# @param [Symbol] type Type of network
|
325
|
+
# @param [Hash] options Options for the network.
|
326
|
+
def network(type, **options)
|
327
|
+
options = options.dup
|
328
|
+
options[:protocol] ||= "tcp"
|
329
|
+
|
330
|
+
# Convert to symbol to allow strings
|
331
|
+
type = type.to_sym
|
332
|
+
|
333
|
+
if !options[:id]
|
334
|
+
default_id = nil
|
335
|
+
|
336
|
+
if type == :forwarded_port
|
337
|
+
# For forwarded ports, set the default ID to be the
|
338
|
+
# concat of host_ip, proto and host_port. This would ensure Vagrant
|
339
|
+
# caters for port forwarding in an IP aliased environment where
|
340
|
+
# different host IP addresses are to be listened on the same port.
|
341
|
+
default_id = "#{options[:host_ip]}#{options[:protocol]}#{options[:host]}"
|
342
|
+
end
|
343
|
+
|
344
|
+
options[:id] = default_id || SecureRandom.uuid
|
345
|
+
end
|
346
|
+
|
347
|
+
# Scope the ID by type so that different types can share IDs
|
348
|
+
id = options[:id]
|
349
|
+
id = "#{type}-#{id}"
|
350
|
+
|
351
|
+
# Merge in the previous settings if we have them.
|
352
|
+
if @__networks.key?(id)
|
353
|
+
options = @__networks[id][1].merge(options)
|
354
|
+
end
|
355
|
+
|
356
|
+
# Merge in the latest settings and set the internal state
|
357
|
+
@__networks[id] = [type.to_sym, options]
|
358
|
+
end
|
359
|
+
|
360
|
+
# Configures a provider for this VM.
|
361
|
+
#
|
362
|
+
# @param [Symbol] name The name of the provider.
|
363
|
+
def provider(name, &block)
|
364
|
+
name = name.to_sym
|
365
|
+
@__providers[name] ||= []
|
366
|
+
@__provider_overrides[name] ||= []
|
367
|
+
|
368
|
+
# Add the provider to the ordering list
|
369
|
+
@__provider_order << name
|
370
|
+
|
371
|
+
if block_given?
|
372
|
+
@__providers[name] << block if block_given?
|
373
|
+
|
374
|
+
# If this block takes two arguments, then we curry it and store
|
375
|
+
# the configuration override for use later.
|
376
|
+
if block.arity == 2
|
377
|
+
@__provider_overrides[name] << block.curry[Vagrant::Config::V2::DummyConfig.new]
|
378
|
+
end
|
379
|
+
end
|
380
|
+
end
|
381
|
+
|
382
|
+
def provision(name, **options, &block)
|
383
|
+
type = name
|
384
|
+
if options.key?(:type)
|
385
|
+
type = options.delete(:type)
|
386
|
+
else
|
387
|
+
name = nil
|
388
|
+
end
|
389
|
+
|
390
|
+
if options.key?(:id)
|
391
|
+
puts "Setting `id` on a provisioner is deprecated. Please use the"
|
392
|
+
puts "new syntax of `config.vm.provision \"name\", type: \"type\""
|
393
|
+
puts "where \"name\" is the replacement for `id`. This will be"
|
394
|
+
puts "fully removed in Vagrant 1.8."
|
395
|
+
|
396
|
+
name = id
|
397
|
+
end
|
398
|
+
|
399
|
+
prov = nil
|
400
|
+
if name
|
401
|
+
name = name.to_sym
|
402
|
+
prov = @provisioners.find { |p| p.name == name }
|
403
|
+
end
|
404
|
+
|
405
|
+
if !prov
|
406
|
+
if options.key?(:before)
|
407
|
+
before = options.delete(:before)
|
408
|
+
end
|
409
|
+
if options.key?(:after)
|
410
|
+
after = options.delete(:after)
|
411
|
+
end
|
412
|
+
|
413
|
+
opts = {before: before, after: after}
|
414
|
+
prov = VagrantConfigProvisioner.new(name, type.to_sym, **opts)
|
415
|
+
@provisioners << prov
|
416
|
+
end
|
417
|
+
|
418
|
+
prov.preserve_order = !!options.delete(:preserve_order) if \
|
419
|
+
options.key?(:preserve_order)
|
420
|
+
prov.run = options.delete(:run) if options.key?(:run)
|
421
|
+
prov.communicator_required = options.delete(:communicator_required) if options.key?(:communicator_required)
|
422
|
+
|
423
|
+
prov.add_config(**options, &block)
|
424
|
+
nil
|
425
|
+
end
|
426
|
+
|
427
|
+
def defined_vms
|
428
|
+
@__defined_vms
|
429
|
+
end
|
430
|
+
|
431
|
+
# This returns the keys of the sub-vms in the order they were
|
432
|
+
# defined.
|
433
|
+
def defined_vm_keys
|
434
|
+
@__defined_vm_keys
|
435
|
+
end
|
436
|
+
|
437
|
+
def define(name, options=nil, &block)
|
438
|
+
name = name.to_sym
|
439
|
+
options ||= {}
|
440
|
+
options = options.dup
|
441
|
+
options[:config_version] ||= "2"
|
442
|
+
|
443
|
+
# Add the name to the array of VM keys. This array is used to
|
444
|
+
# preserve the order in which VMs are defined.
|
445
|
+
@__defined_vm_keys << name if !@__defined_vm_keys.include?(name)
|
446
|
+
|
447
|
+
# Add the SubVM to the hash of defined VMs
|
448
|
+
if !@__defined_vms[name]
|
449
|
+
@__defined_vms[name] = VagrantConfigSubVM.new
|
450
|
+
end
|
451
|
+
|
452
|
+
@__defined_vms[name].options.merge!(options)
|
453
|
+
@__defined_vms[name].config_procs << [options[:config_version], block] if block
|
454
|
+
end
|
455
|
+
|
456
|
+
# Stores disk config options from Vagrantfile
|
457
|
+
#
|
458
|
+
# @param [Symbol] type
|
459
|
+
# @param [Hash] options
|
460
|
+
# @param [Block] block
|
461
|
+
def disk(type, **options, &block)
|
462
|
+
disk_config = VagrantConfigDisk.new(type)
|
463
|
+
|
464
|
+
# Remove provider__option options before set_options, otherwise will
|
465
|
+
# show up as missing setting
|
466
|
+
# Extract provider hash options as well
|
467
|
+
provider_options = {}
|
468
|
+
options.delete_if do |p,o|
|
469
|
+
if o.is_a?(Hash) || p.to_s.include?("__")
|
470
|
+
provider_options[p] = o
|
471
|
+
true
|
472
|
+
end
|
473
|
+
end
|
474
|
+
|
475
|
+
disk_config.set_options(options)
|
476
|
+
|
477
|
+
# Add provider config
|
478
|
+
disk_config.add_provider_config(**provider_options, &block)
|
479
|
+
|
480
|
+
@disks << disk_config
|
481
|
+
end
|
482
|
+
|
483
|
+
# Stores config options for cloud_init
|
484
|
+
#
|
485
|
+
# @param [Symbol] type
|
486
|
+
# @param [Hash] options
|
487
|
+
# @param [Block] block
|
488
|
+
def cloud_init(type=nil, **options, &block)
|
489
|
+
type = type.to_sym if type
|
490
|
+
|
491
|
+
cloud_init_config = VagrantConfigCloudInit.new(type)
|
492
|
+
|
493
|
+
if block_given?
|
494
|
+
block.call(cloud_init_config, VagrantConfigCloudInit)
|
495
|
+
else
|
496
|
+
# config is hash
|
497
|
+
cloud_init_config.set_options(options)
|
498
|
+
end
|
499
|
+
|
500
|
+
@cloud_init_configs << cloud_init_config
|
501
|
+
end
|
502
|
+
|
503
|
+
#-------------------------------------------------------------------
|
504
|
+
# Internal methods, don't call these.
|
505
|
+
#-------------------------------------------------------------------
|
506
|
+
|
507
|
+
def finalize!
|
508
|
+
# Defaults
|
509
|
+
@allowed_synced_folder_types = nil if @allowed_synced_folder_types == UNSET_VALUE
|
510
|
+
@base_mac = nil if @base_mac == UNSET_VALUE
|
511
|
+
@base_address = nil if @base_address == UNSET_VALUE
|
512
|
+
@boot_timeout = 300 if @boot_timeout == UNSET_VALUE
|
513
|
+
@box = nil if @box == UNSET_VALUE
|
514
|
+
@box_architecture = :auto if @box_architecture == UNSET_VALUE
|
515
|
+
# If box architecture value was set, force to string
|
516
|
+
if @box_architecture && @box_architecture != :auto
|
517
|
+
@box_architecture = @box_architecture.to_s
|
518
|
+
end
|
519
|
+
@ignore_box_vagrantfile = false if @ignore_box_vagrantfile == UNSET_VALUE
|
520
|
+
|
521
|
+
if @box_check_update == UNSET_VALUE
|
522
|
+
@box_check_update = !present?(ENV["VAGRANT_BOX_UPDATE_CHECK_DISABLE"])
|
523
|
+
end
|
524
|
+
|
525
|
+
@box_download_ca_cert = nil if @box_download_ca_cert == UNSET_VALUE
|
526
|
+
@box_download_ca_path = nil if @box_download_ca_path == UNSET_VALUE
|
527
|
+
@box_download_checksum = nil if @box_download_checksum == UNSET_VALUE
|
528
|
+
@box_download_checksum_type = nil if @box_download_checksum_type == UNSET_VALUE
|
529
|
+
@box_download_client_cert = nil if @box_download_client_cert == UNSET_VALUE
|
530
|
+
@box_download_disable_ssl_revoke_best_effort = false if @box_download_disable_ssl_revoke_best_effort == UNSET_VALUE
|
531
|
+
@box_download_insecure = false if @box_download_insecure == UNSET_VALUE
|
532
|
+
@box_download_location_trusted = false if @box_download_location_trusted == UNSET_VALUE
|
533
|
+
@box_url = nil if @box_url == UNSET_VALUE
|
534
|
+
@box_version = nil if @box_version == UNSET_VALUE
|
535
|
+
@box_download_options = {} if @box_download_options == UNSET_VALUE
|
536
|
+
@box_extra_download_options = Vagrant::Util::MapCommandOptions.map_to_command_options(@box_download_options)
|
537
|
+
@allow_hosts_modification = true if @allow_hosts_modification == UNSET_VALUE
|
538
|
+
@clone = nil if @clone == UNSET_VALUE
|
539
|
+
@communicator = nil if @communicator == UNSET_VALUE
|
540
|
+
@graceful_halt_timeout = 60 if @graceful_halt_timeout == UNSET_VALUE
|
541
|
+
@guest = nil if @guest == UNSET_VALUE
|
542
|
+
@hostname = nil if @hostname == UNSET_VALUE
|
543
|
+
@hostname = @hostname.to_s if @hostname
|
544
|
+
@post_up_message = "" if @post_up_message == UNSET_VALUE
|
545
|
+
|
546
|
+
if @usable_port_range == UNSET_VALUE
|
547
|
+
@usable_port_range = (2200..2250)
|
548
|
+
end
|
549
|
+
|
550
|
+
if @allowed_synced_folder_types
|
551
|
+
@allowed_synced_folder_types = Array(@allowed_synced_folder_types).map(&:to_sym)
|
552
|
+
end
|
553
|
+
|
554
|
+
# Make sure that the download checksum is a string and that
|
555
|
+
# the type is a symbol
|
556
|
+
@box_download_checksum = "" if !@box_download_checksum
|
557
|
+
if @box_download_checksum_type
|
558
|
+
@box_download_checksum_type = @box_download_checksum_type.to_sym
|
559
|
+
end
|
560
|
+
|
561
|
+
# Make sure the box URL is an array if it is set
|
562
|
+
@box_url = Array(@box_url) if @box_url
|
563
|
+
|
564
|
+
# Set the communicator properly
|
565
|
+
@communicator = @communicator.to_sym if @communicator
|
566
|
+
|
567
|
+
# Set the guest properly
|
568
|
+
@guest = @guest.to_sym if @guest
|
569
|
+
|
570
|
+
# If we haven't defined a single VM, then we need to define a
|
571
|
+
# default VM which just inherits the rest of the configuration.
|
572
|
+
define(DEFAULT_VM_NAME) if defined_vm_keys.empty?
|
573
|
+
|
574
|
+
# Make sure the SSH forwarding is added if it doesn't exist
|
575
|
+
if @communicator == :winrm
|
576
|
+
if !@__networks["forwarded_port-winrm"]
|
577
|
+
network :forwarded_port,
|
578
|
+
guest: 5985,
|
579
|
+
host: 55985,
|
580
|
+
host_ip: "127.0.0.1",
|
581
|
+
id: "winrm",
|
582
|
+
auto_correct: true
|
583
|
+
end
|
584
|
+
if !@__networks["forwarded_port-winrm-ssl"]
|
585
|
+
network :forwarded_port,
|
586
|
+
guest: 5986,
|
587
|
+
host: 55986,
|
588
|
+
host_ip: "127.0.0.1",
|
589
|
+
id: "winrm-ssl",
|
590
|
+
auto_correct: true
|
591
|
+
end
|
592
|
+
end
|
593
|
+
# forward SSH ports regardless of communicator
|
594
|
+
if !@__networks["forwarded_port-ssh"]
|
595
|
+
network :forwarded_port,
|
596
|
+
guest: 22,
|
597
|
+
host: 2222,
|
598
|
+
host_ip: "127.0.0.1",
|
599
|
+
id: "ssh",
|
600
|
+
auto_correct: true
|
601
|
+
end
|
602
|
+
|
603
|
+
# Clean up some network configurations
|
604
|
+
@__networks.values.each do |type, opts|
|
605
|
+
if type == :forwarded_port
|
606
|
+
opts[:guest] = opts[:guest].to_i if opts[:guest]
|
607
|
+
opts[:host] = opts[:host].to_i if opts[:host]
|
608
|
+
end
|
609
|
+
end
|
610
|
+
|
611
|
+
# Compile all the provider configurations
|
612
|
+
@__providers.each do |name, blocks|
|
613
|
+
# TODO(spox): this is a hack that needs to be resolved elsewhere
|
614
|
+
|
615
|
+
name = name.to_sym
|
616
|
+
|
617
|
+
|
618
|
+
# If we don't have any configuration blocks, then ignore it
|
619
|
+
next if blocks.empty?
|
620
|
+
|
621
|
+
# Find the configuration class for this provider
|
622
|
+
config_class = Vagrant.plugin("2").manager.provider_configs[name]
|
623
|
+
config_class ||= Vagrant::Config::V2::DummyConfig
|
624
|
+
|
625
|
+
l = Log4r::Logger.new(self.class.name.downcase)
|
626
|
+
l.info("config class lookup for provider #{name.inspect} gave us base class: #{config_class}")
|
627
|
+
|
628
|
+
# Load it up
|
629
|
+
config = config_class.new
|
630
|
+
|
631
|
+
begin
|
632
|
+
blocks.each do |b|
|
633
|
+
new_config = config_class.new
|
634
|
+
b.call(new_config, Vagrant::Config::V2::DummyConfig.new)
|
635
|
+
config = config.merge(new_config)
|
636
|
+
end
|
637
|
+
rescue Exception => e
|
638
|
+
@logger.error("Vagrantfile load error: #{e.message}")
|
639
|
+
@logger.error(e.inspect)
|
640
|
+
@logger.error(e.message)
|
641
|
+
@logger.error(e.backtrace.join("\n"))
|
642
|
+
|
643
|
+
line = "(unknown)"
|
644
|
+
if e.backtrace && e.backtrace[0]
|
645
|
+
line = e.backtrace.first.slice(0, e.backtrace.first.rindex(':')).rpartition(':').last
|
646
|
+
end
|
647
|
+
|
648
|
+
raise Vagrant::Errors::VagrantfileLoadError,
|
649
|
+
path: "<provider config: #{name}>",
|
650
|
+
line: line,
|
651
|
+
exception_class: e.class,
|
652
|
+
message: e.message
|
653
|
+
end
|
654
|
+
|
655
|
+
config.finalize!
|
656
|
+
|
657
|
+
# Store it for retrieval later
|
658
|
+
@__compiled_provider_configs[name] = config
|
659
|
+
end
|
660
|
+
|
661
|
+
# Finalize all the provisioners
|
662
|
+
@provisioners.each do |p|
|
663
|
+
p.config.finalize! if !p.invalid?
|
664
|
+
p.run = p.run.to_sym if p.run
|
665
|
+
end
|
666
|
+
|
667
|
+
current_dir_shared = false
|
668
|
+
@__synced_folders.each do |id, options|
|
669
|
+
if options[:hostpath] == '.'
|
670
|
+
current_dir_shared = true
|
671
|
+
end
|
672
|
+
end
|
673
|
+
|
674
|
+
@disks.each do |d|
|
675
|
+
d.finalize!
|
676
|
+
end
|
677
|
+
|
678
|
+
@cloud_init_configs.each do |c|
|
679
|
+
c.finalize!
|
680
|
+
end
|
681
|
+
|
682
|
+
if !current_dir_shared && !@__synced_folders["/vagrant"]
|
683
|
+
synced_folder(".", "/vagrant")
|
684
|
+
end
|
685
|
+
|
686
|
+
# Flag that we finalized
|
687
|
+
@__finalized = true
|
688
|
+
end
|
689
|
+
|
690
|
+
# This returns the compiled provider-specific configuration for the
|
691
|
+
# given provider.
|
692
|
+
#
|
693
|
+
# @param [Symbol] name Name of the provider.
|
694
|
+
def get_provider_config(name)
|
695
|
+
raise "Must finalize first." if !@__finalized
|
696
|
+
|
697
|
+
@logger = Log4r::Logger.new(self.class.name.downcase)
|
698
|
+
@logger.info("looking up provider config for: #{name.inspect}")
|
699
|
+
|
700
|
+
result = @__compiled_provider_configs[name]
|
701
|
+
|
702
|
+
@logger.info("provider config value that was stored: #{result.inspect}")
|
703
|
+
|
704
|
+
# If no compiled configuration was found, then we try to just
|
705
|
+
# use the default configuration from the plugin.
|
706
|
+
if !result
|
707
|
+
@logger.info("no result so doing plugin config lookup using name: #{name.inspect}")
|
708
|
+
config_class = Vagrant.plugin("2").manager.provider_configs[name]
|
709
|
+
@logger.info("config class that we got for the lookup: #{config_class}")
|
710
|
+
if config_class
|
711
|
+
result = config_class.new
|
712
|
+
result.finalize!
|
713
|
+
end
|
714
|
+
end
|
715
|
+
|
716
|
+
return result
|
717
|
+
end
|
718
|
+
|
719
|
+
# This returns a list of VM configurations that are overrides
|
720
|
+
# for this provider.
|
721
|
+
#
|
722
|
+
# @param [Symbol] name Name of the provider
|
723
|
+
# @return [Array<Proc>]
|
724
|
+
def get_provider_overrides(name)
|
725
|
+
(@__provider_overrides[name] || []).map do |p|
|
726
|
+
["2", p]
|
727
|
+
end
|
728
|
+
end
|
729
|
+
|
730
|
+
# This returns the list of networks configured.
|
731
|
+
def networks
|
732
|
+
@__networks.values
|
733
|
+
end
|
734
|
+
|
735
|
+
# This returns the list of synced folders
|
736
|
+
def synced_folders
|
737
|
+
@__synced_folders
|
738
|
+
end
|
739
|
+
|
740
|
+
def validate(machine, ignore_provider=nil)
|
741
|
+
errors = _detected_errors
|
742
|
+
|
743
|
+
if @allow_fstab_modification == UNSET_VALUE
|
744
|
+
machine.synced_folders.types.each do |impl_name|
|
745
|
+
inst = machine.synced_folders.type(impl_name)
|
746
|
+
if inst.capability?(:default_fstab_modification) && inst.capability(:default_fstab_modification) == false
|
747
|
+
@allow_fstab_modification = false
|
748
|
+
break
|
749
|
+
end
|
750
|
+
end
|
751
|
+
@allow_fstab_modification = true if @allow_fstab_modification == UNSET_VALUE
|
752
|
+
end
|
753
|
+
|
754
|
+
if !box && !clone && !machine.provider_options[:box_optional]
|
755
|
+
errors << I18n.t("vagrant.config.vm.box_missing")
|
756
|
+
end
|
757
|
+
|
758
|
+
if box && clone
|
759
|
+
errors << I18n.t("vagrant.config.vm.clone_and_box")
|
760
|
+
end
|
761
|
+
|
762
|
+
if box && box.empty?
|
763
|
+
errors << I18n.t("vagrant.config.vm.box_empty", machine_name: machine.name)
|
764
|
+
end
|
765
|
+
|
766
|
+
errors << I18n.t("vagrant.config.vm.hostname_invalid_characters", name: machine.name) if \
|
767
|
+
@hostname && @hostname !~ /^[a-z0-9][-.a-z0-9]*$/i
|
768
|
+
|
769
|
+
if @box_version
|
770
|
+
@box_version.to_s.split(",").each do |v|
|
771
|
+
begin
|
772
|
+
Gem::Requirement.new(v.strip)
|
773
|
+
rescue Gem::Requirement::BadRequirementError
|
774
|
+
errors << I18n.t(
|
775
|
+
"vagrant.config.vm.bad_version", version: v)
|
776
|
+
end
|
777
|
+
end
|
778
|
+
end
|
779
|
+
|
780
|
+
if box_download_ca_cert
|
781
|
+
path = Pathname.new(box_download_ca_cert).
|
782
|
+
expand_path(machine.env.root_path)
|
783
|
+
if !path.file?
|
784
|
+
errors << I18n.t(
|
785
|
+
"vagrant.config.vm.box_download_ca_cert_not_found",
|
786
|
+
path: box_download_ca_cert)
|
787
|
+
end
|
788
|
+
end
|
789
|
+
|
790
|
+
if box_download_ca_path
|
791
|
+
path = Pathname.new(box_download_ca_path).
|
792
|
+
expand_path(machine.env.root_path)
|
793
|
+
if !path.directory?
|
794
|
+
errors << I18n.t(
|
795
|
+
"vagrant.config.vm.box_download_ca_path_not_found",
|
796
|
+
path: box_download_ca_path)
|
797
|
+
end
|
798
|
+
end
|
799
|
+
|
800
|
+
if box_download_checksum_type
|
801
|
+
if box_download_checksum == ""
|
802
|
+
errors << I18n.t("vagrant.config.vm.box_download_checksum_blank")
|
803
|
+
end
|
804
|
+
else
|
805
|
+
if box_download_checksum != ""
|
806
|
+
errors << I18n.t("vagrant.config.vm.box_download_checksum_notblank")
|
807
|
+
end
|
808
|
+
end
|
809
|
+
|
810
|
+
if !box_download_options.is_a?(Hash)
|
811
|
+
errors << I18n.t("vagrant.config.vm.box_download_options_type", type: box_download_options.class.to_s)
|
812
|
+
end
|
813
|
+
|
814
|
+
box_download_options.each do |k, v|
|
815
|
+
# If the value is truthy and
|
816
|
+
# if `box_extra_download_options` does not include the key
|
817
|
+
# then the conversion to extra download options produced an error
|
818
|
+
if v && !box_extra_download_options.include?("--#{k}")
|
819
|
+
errors << I18n.t("vagrant.config.vm.box_download_options_not_converted", missing_key: k)
|
820
|
+
end
|
821
|
+
end
|
822
|
+
|
823
|
+
used_guest_paths = Set.new
|
824
|
+
@__synced_folders.each do |id, options|
|
825
|
+
# If the shared folder is disabled then don't worry about validating it
|
826
|
+
next if options[:disabled]
|
827
|
+
|
828
|
+
guestpath = Pathname.new(options[:guestpath]) if options[:guestpath]
|
829
|
+
hostpath = Pathname.new(options[:hostpath]).expand_path(machine.env.root_path)
|
830
|
+
|
831
|
+
if guestpath.to_s == "" && id.to_s == ""
|
832
|
+
errors << I18n.t("vagrant.config.vm.shared_folder_requires_guestpath_or_name")
|
833
|
+
elsif guestpath.to_s != ""
|
834
|
+
if guestpath.relative? && guestpath.to_s !~ /^\w+:/
|
835
|
+
errors << I18n.t("vagrant.config.vm.shared_folder_guestpath_relative",
|
836
|
+
path: options[:guestpath])
|
837
|
+
else
|
838
|
+
if used_guest_paths.include?(options[:guestpath])
|
839
|
+
errors << I18n.t("vagrant.config.vm.shared_folder_guestpath_duplicate",
|
840
|
+
path: options[:guestpath])
|
841
|
+
end
|
842
|
+
|
843
|
+
used_guest_paths.add(options[:guestpath])
|
844
|
+
end
|
845
|
+
end
|
846
|
+
|
847
|
+
if !hostpath.directory? && !options[:create]
|
848
|
+
errors << I18n.t("vagrant.config.vm.shared_folder_hostpath_missing",
|
849
|
+
path: options[:hostpath])
|
850
|
+
end
|
851
|
+
|
852
|
+
if options[:type] == :nfs && !options[:nfs__quiet]
|
853
|
+
if options[:owner] || options[:group]
|
854
|
+
# Owner/group don't work with NFS
|
855
|
+
errors << I18n.t("vagrant.config.vm.shared_folder_nfs_owner_group",
|
856
|
+
path: options[:hostpath])
|
857
|
+
end
|
858
|
+
end
|
859
|
+
|
860
|
+
if options[:mount_options] && !options[:mount_options].is_a?(Array)
|
861
|
+
errors << I18n.t("vagrant.config.vm.shared_folder_mount_options_array")
|
862
|
+
end
|
863
|
+
|
864
|
+
if options[:type]
|
865
|
+
plugins = Vagrant.plugin("2").manager.synced_folders
|
866
|
+
impl_class = plugins[options[:type]]
|
867
|
+
if !impl_class
|
868
|
+
errors << I18n.t("vagrant.config.vm.shared_folder_invalid_option_type",
|
869
|
+
type: options[:type],
|
870
|
+
options: plugins.keys.join(', '))
|
871
|
+
end
|
872
|
+
end
|
873
|
+
end
|
874
|
+
|
875
|
+
# Validate networks
|
876
|
+
has_fp_port_error = false
|
877
|
+
fp_used = Set.new
|
878
|
+
valid_network_types = [:forwarded_port, :private_network, :public_network]
|
879
|
+
|
880
|
+
port_range=(1..65535)
|
881
|
+
has_hostname_config = false
|
882
|
+
networks.each do |type, options|
|
883
|
+
if options[:hostname]
|
884
|
+
if has_hostname_config
|
885
|
+
errors << I18n.t("vagrant.config.vm.multiple_networks_set_hostname")
|
886
|
+
end
|
887
|
+
if options[:ip] == nil
|
888
|
+
errors << I18n.t("vagrant.config.vm.network_with_hostname_must_set_ip")
|
889
|
+
end
|
890
|
+
has_hostname_config = true
|
891
|
+
end
|
892
|
+
if !valid_network_types.include?(type)
|
893
|
+
errors << I18n.t("vagrant.config.vm.network_type_invalid",
|
894
|
+
type: type.to_s)
|
895
|
+
end
|
896
|
+
|
897
|
+
if type == :forwarded_port
|
898
|
+
if !has_fp_port_error && (!options[:guest] || !options[:host])
|
899
|
+
errors << I18n.t("vagrant.config.vm.network_fp_requires_ports")
|
900
|
+
has_fp_port_error = true
|
901
|
+
end
|
902
|
+
|
903
|
+
if options[:host]
|
904
|
+
key = "#{options[:host_ip]}#{options[:protocol]}#{options[:host]}"
|
905
|
+
if fp_used.include?(key)
|
906
|
+
errors << I18n.t("vagrant.config.vm.network_fp_host_not_unique",
|
907
|
+
host: options[:host].to_s,
|
908
|
+
protocol: options[:protocol].to_s)
|
909
|
+
end
|
910
|
+
|
911
|
+
fp_used.add(key)
|
912
|
+
end
|
913
|
+
|
914
|
+
if !port_range.include?(options[:host]) || !port_range.include?(options[:guest])
|
915
|
+
errors << I18n.t("vagrant.config.vm.network_fp_invalid_port")
|
916
|
+
end
|
917
|
+
end
|
918
|
+
|
919
|
+
if type == :private_network
|
920
|
+
if options[:type] && options[:type].to_sym != :dhcp
|
921
|
+
if !options[:ip]
|
922
|
+
errors << I18n.t("vagrant.config.vm.network_ip_required")
|
923
|
+
end
|
924
|
+
end
|
925
|
+
|
926
|
+
if options[:ip] && (options[:ip].end_with?(".1") || options[:ip].end_with?(":1")) && (options[:type] || "").to_sym != :dhcp
|
927
|
+
machine.ui.warn(I18n.t(
|
928
|
+
"vagrant.config.vm.network_ip_ends_in_one"))
|
929
|
+
end
|
930
|
+
end
|
931
|
+
end
|
932
|
+
|
933
|
+
# Validate disks
|
934
|
+
# Check if there is more than one primary disk defined and throw an error
|
935
|
+
primary_disks = @disks.select { |d| d.primary && d.type == :disk }
|
936
|
+
if primary_disks.size > 1
|
937
|
+
errors << I18n.t("vagrant.config.vm.multiple_primary_disks_error",
|
938
|
+
name: machine.name)
|
939
|
+
end
|
940
|
+
|
941
|
+
disk_names = @disks.map { |d| d.name }
|
942
|
+
duplicate_names = disk_names.find_all { |d| disk_names.count(d) > 1 }
|
943
|
+
if duplicate_names.any?
|
944
|
+
errors << I18n.t("vagrant.config.vm.multiple_disk_names_error",
|
945
|
+
name: machine.name,
|
946
|
+
disk_names: duplicate_names.uniq.join("\n"))
|
947
|
+
end
|
948
|
+
|
949
|
+
disk_files = @disks.map { |d| d.file }
|
950
|
+
duplicate_files = disk_files.find_all { |d| d && disk_files.count(d) > 1 }
|
951
|
+
if duplicate_files.any?
|
952
|
+
errors << I18n.t("vagrant.config.vm.multiple_disk_files_error",
|
953
|
+
name: machine.name,
|
954
|
+
disk_files: duplicate_files.uniq.join("\n"))
|
955
|
+
end
|
956
|
+
|
957
|
+
@disks.each do |d|
|
958
|
+
error = d.validate(machine)
|
959
|
+
errors.concat(error) if !error.empty?
|
960
|
+
end
|
961
|
+
|
962
|
+
# Validate clout_init_configs
|
963
|
+
@cloud_init_configs.each do |c|
|
964
|
+
error = c.validate(machine)
|
965
|
+
errors.concat error if !error.empty?
|
966
|
+
end
|
967
|
+
|
968
|
+
# We're done with VM level errors so prepare the section
|
969
|
+
errors = { "vm" => errors }
|
970
|
+
|
971
|
+
# Validate only the _active_ provider
|
972
|
+
if machine.provider_config
|
973
|
+
if !ignore_provider
|
974
|
+
provider_errors = machine.provider_config.validate(machine)
|
975
|
+
if provider_errors
|
976
|
+
errors = Vagrant::Config::V2::Util.merge_errors(errors, provider_errors)
|
977
|
+
end
|
978
|
+
else
|
979
|
+
machine.ui.warn(I18n.t("vagrant.config.vm.ignore_provider_config"))
|
980
|
+
end
|
981
|
+
end
|
982
|
+
|
983
|
+
# Validate provisioners
|
984
|
+
@provisioners.each do |vm_provisioner|
|
985
|
+
if vm_provisioner.invalid?
|
986
|
+
name = vm_provisioner.name.to_s
|
987
|
+
name = vm_provisioner.type.to_s if name.empty?
|
988
|
+
errors["vm"] << I18n.t("vagrant.config.vm.provisioner_not_found",
|
989
|
+
name: name)
|
990
|
+
next
|
991
|
+
end
|
992
|
+
|
993
|
+
provisioner_errors = vm_provisioner.validate(machine, @provisioners)
|
994
|
+
if provisioner_errors
|
995
|
+
errors = Vagrant::Config::V2::Util.merge_errors(errors, provisioner_errors)
|
996
|
+
end
|
997
|
+
|
998
|
+
if vm_provisioner.config
|
999
|
+
provisioner_errors = vm_provisioner.config.validate(machine)
|
1000
|
+
if provisioner_errors
|
1001
|
+
errors = Vagrant::Config::V2::Util.merge_errors(errors, provisioner_errors)
|
1002
|
+
end
|
1003
|
+
end
|
1004
|
+
end
|
1005
|
+
|
1006
|
+
# If running from the Windows Subsystem for Linux, validate that configured
|
1007
|
+
# hostpaths for synced folders are on DrvFs file systems, or the synced
|
1008
|
+
# folder implementation explicitly supports non-DrvFs file system types
|
1009
|
+
# within the WSL
|
1010
|
+
if Vagrant::Util::Platform.wsl?
|
1011
|
+
# Create a helper that will with the synced folders mixin
|
1012
|
+
# from the builtin action to get the correct implementation
|
1013
|
+
# to be used for each folder
|
1014
|
+
sf_helper = Class.new do
|
1015
|
+
include Vagrant::Action::Builtin::MixinSyncedFolders
|
1016
|
+
end.new
|
1017
|
+
folders = sf_helper.synced_folders(machine, config: self)
|
1018
|
+
folders.each do |impl_name, data|
|
1019
|
+
data.each do |_, fs|
|
1020
|
+
hostpath = File.expand_path(fs[:hostpath], machine.env.root_path)
|
1021
|
+
if !Vagrant::Util::Platform.wsl_drvfs_path?(hostpath)
|
1022
|
+
sf_klass = sf_helper.plugins[impl_name.to_sym].first
|
1023
|
+
if sf_klass.respond_to?(:wsl_allow_non_drvfs?) && sf_klass.wsl_allow_non_drvfs?
|
1024
|
+
next
|
1025
|
+
end
|
1026
|
+
errors["vm"] << I18n.t("vagrant.config.vm.shared_folder_wsl_not_drvfs",
|
1027
|
+
path: fs[:hostpath])
|
1028
|
+
end
|
1029
|
+
end
|
1030
|
+
end
|
1031
|
+
end
|
1032
|
+
|
1033
|
+
# Validate sub-VMs if there are any
|
1034
|
+
@__defined_vms.each do |name, _|
|
1035
|
+
if name =~ /[\[\]\{\}\/]/
|
1036
|
+
errors["vm"] << I18n.t(
|
1037
|
+
"vagrant.config.vm.name_invalid",
|
1038
|
+
name: name)
|
1039
|
+
end
|
1040
|
+
end
|
1041
|
+
|
1042
|
+
if ![TrueClass, FalseClass].include?(@allow_fstab_modification.class)
|
1043
|
+
errors["vm"] << I18n.t("vagrant.config.vm.config_type",
|
1044
|
+
option: "allow_fstab_modification", given: @allow_fstab_modification.class, required: "Boolean"
|
1045
|
+
)
|
1046
|
+
end
|
1047
|
+
|
1048
|
+
if ![TrueClass, FalseClass].include?(@allow_hosts_modification.class)
|
1049
|
+
errors["vm"] << I18n.t("vagrant.config.vm.config_type",
|
1050
|
+
option: "allow_hosts_modification", given: @allow_hosts_modification.class, required: "Boolean"
|
1051
|
+
)
|
1052
|
+
end
|
1053
|
+
|
1054
|
+
errors
|
1055
|
+
end
|
1056
|
+
|
1057
|
+
def __providers
|
1058
|
+
@__provider_order
|
1059
|
+
end
|
1060
|
+
end
|
1061
|
+
end
|
1062
|
+
end
|