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,936 @@
|
|
1
|
+
# Copyright (c) HashiCorp, Inc.
|
2
|
+
# SPDX-License-Identifier: BUSL-1.1
|
3
|
+
|
4
|
+
require "monitor"
|
5
|
+
require "pathname"
|
6
|
+
require "set"
|
7
|
+
require "tempfile"
|
8
|
+
require "fileutils"
|
9
|
+
require "uri"
|
10
|
+
|
11
|
+
require "rubygems/package"
|
12
|
+
require "rubygems/uninstaller"
|
13
|
+
require "rubygems/name_tuple"
|
14
|
+
|
15
|
+
require_relative "shared_helpers"
|
16
|
+
require_relative "version"
|
17
|
+
require_relative "util/safe_env"
|
18
|
+
|
19
|
+
module Vagrant
|
20
|
+
# This class manages Vagrant's interaction with Bundler. Vagrant uses
|
21
|
+
# Bundler as a way to properly resolve all dependencies of Vagrant and
|
22
|
+
# all Vagrant-installed plugins.
|
23
|
+
class Bundler
|
24
|
+
class SolutionFile
|
25
|
+
# @return [Pathname] path to plugin file
|
26
|
+
attr_reader :plugin_file
|
27
|
+
# @return [Pathname] path to solution file
|
28
|
+
attr_reader :solution_file
|
29
|
+
# @return [Array<Gem::Resolver::DependencyRequest>] list of required dependencies
|
30
|
+
attr_reader :dependency_list
|
31
|
+
|
32
|
+
# @param [Pathname] plugin_file Path to plugin file
|
33
|
+
# @param [Pathname] solution_file Custom path to solution file
|
34
|
+
def initialize(plugin_file:, solution_file: nil)
|
35
|
+
@logger = Log4r::Logger.new("vagrant::bundler::solution_file")
|
36
|
+
@plugin_file = Pathname.new(plugin_file.to_s)
|
37
|
+
if solution_file
|
38
|
+
@solution_file = Pathname.new(solution_file.to_s)
|
39
|
+
else
|
40
|
+
@solution_file = Pathname.new(@plugin_file.to_s + ".sol")
|
41
|
+
end
|
42
|
+
@valid = false
|
43
|
+
@dependency_list = [].freeze
|
44
|
+
@logger.debug("new solution file instance plugin_file=#{plugin_file} " \
|
45
|
+
"solution_file=#{solution_file}")
|
46
|
+
load
|
47
|
+
end
|
48
|
+
|
49
|
+
# Set the list of dependencies for this solution
|
50
|
+
#
|
51
|
+
# @param [Array<Gem::Dependency>] dependency_list List of dependencies for the solution
|
52
|
+
# @return [Array<Gem::Resolver::DependencyRequest>]
|
53
|
+
def dependency_list=(dependency_list)
|
54
|
+
Array(dependency_list).each do |d|
|
55
|
+
if !d.is_a?(Gem::Dependency)
|
56
|
+
raise TypeError, "Expected `Gem::Dependency` but received `#{d.class}`"
|
57
|
+
end
|
58
|
+
end
|
59
|
+
@dependency_list = dependency_list.map do |d|
|
60
|
+
Gem::Resolver::DependencyRequest.new(d, nil).freeze
|
61
|
+
end.freeze
|
62
|
+
end
|
63
|
+
|
64
|
+
# @return [Boolean] contained solution is valid
|
65
|
+
def valid?
|
66
|
+
@valid
|
67
|
+
end
|
68
|
+
|
69
|
+
# @return [FalseClass] invalidate this solution file
|
70
|
+
def invalidate!
|
71
|
+
@valid = false
|
72
|
+
@logger.debug("manually invalidating solution file #{self}")
|
73
|
+
@valid
|
74
|
+
end
|
75
|
+
|
76
|
+
# Delete the solution file
|
77
|
+
#
|
78
|
+
# @return [Boolean] true if file was deleted
|
79
|
+
def delete!
|
80
|
+
if !solution_file.exist?
|
81
|
+
@logger.debug("solution file does not exist. nothing to delete.")
|
82
|
+
return false
|
83
|
+
end
|
84
|
+
@logger.debug("deleting solution file - #{solution_file}")
|
85
|
+
solution_file.delete
|
86
|
+
true
|
87
|
+
end
|
88
|
+
|
89
|
+
# Store the solution file
|
90
|
+
def store!
|
91
|
+
if !plugin_file.exist?
|
92
|
+
@logger.debug("plugin file does not exist, not storing solution")
|
93
|
+
return
|
94
|
+
end
|
95
|
+
if !solution_file.dirname.exist?
|
96
|
+
@logger.debug("creating directory for solution file: #{solution_file.dirname}")
|
97
|
+
solution_file.dirname.mkpath
|
98
|
+
end
|
99
|
+
@logger.debug("writing solution file contents to disk")
|
100
|
+
solution_file.write({
|
101
|
+
dependencies: dependency_list.map { |d|
|
102
|
+
[d.dependency.name, d.dependency.requirements_list]
|
103
|
+
},
|
104
|
+
checksum: plugin_file_checksum,
|
105
|
+
vagrant_version: Vagrant::VERSION
|
106
|
+
}.to_json)
|
107
|
+
@valid = true
|
108
|
+
end
|
109
|
+
|
110
|
+
def to_s # :nodoc:
|
111
|
+
"<Vagrant::Bundler::SolutionFile:#{plugin_file}:" \
|
112
|
+
"#{solution_file}:#{valid? ? "valid" : "invalid"}>"
|
113
|
+
end
|
114
|
+
|
115
|
+
protected
|
116
|
+
|
117
|
+
# Load the solution file for the plugin path provided
|
118
|
+
# if it exists. Validate solution is still applicable
|
119
|
+
# before injecting dependencies.
|
120
|
+
def load
|
121
|
+
if !plugin_file.exist? || !solution_file.exist?
|
122
|
+
@logger.debug("missing file so skipping loading")
|
123
|
+
return
|
124
|
+
end
|
125
|
+
solution = read_solution || return
|
126
|
+
return if !valid_solution?(
|
127
|
+
checksum: solution[:checksum],
|
128
|
+
version: solution[:vagrant_version]
|
129
|
+
)
|
130
|
+
@logger.debug("loading solution dependency list")
|
131
|
+
@dependency_list = Array(solution[:dependencies]).map do |name, requirements|
|
132
|
+
gd = Gem::Dependency.new(name, requirements)
|
133
|
+
Gem::Resolver::DependencyRequest.new(gd, nil).freeze
|
134
|
+
end.freeze
|
135
|
+
@logger.debug("solution dependency list: #{dependency_list}")
|
136
|
+
@valid = true
|
137
|
+
end
|
138
|
+
|
139
|
+
# Validate the given checksum matches the plugin file
|
140
|
+
# checksum
|
141
|
+
#
|
142
|
+
# @param [String] checksum Checksum value to validate
|
143
|
+
# @return [Boolean]
|
144
|
+
def valid_solution?(checksum:, version:)
|
145
|
+
file_checksum = plugin_file_checksum
|
146
|
+
@logger.debug("solution validation check CHECKSUM #{file_checksum} <-> #{checksum}" \
|
147
|
+
" VERSION #{Vagrant::VERSION} <-> #{version}")
|
148
|
+
plugin_file_checksum == checksum &&
|
149
|
+
Vagrant::VERSION == version
|
150
|
+
end
|
151
|
+
|
152
|
+
# @return [String] checksum of plugin file
|
153
|
+
def plugin_file_checksum
|
154
|
+
digest = Digest::SHA256.new
|
155
|
+
digest.file(plugin_file.to_s)
|
156
|
+
digest.hexdigest
|
157
|
+
end
|
158
|
+
|
159
|
+
# Read contents of solution file and parse
|
160
|
+
#
|
161
|
+
# @return [Hash]
|
162
|
+
def read_solution
|
163
|
+
@logger.debug("reading solution file - #{solution_file}")
|
164
|
+
begin
|
165
|
+
hash = JSON.load(solution_file.read)
|
166
|
+
Vagrant::Util::HashWithIndifferentAccess.new(hash)
|
167
|
+
rescue => err
|
168
|
+
@logger.warn("failed to load solution file, ignoring (error: #{err})")
|
169
|
+
nil
|
170
|
+
end
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
# Location of HashiCorp gem repository
|
175
|
+
HASHICORP_GEMSTORE = "https://gems.hashicorp.com/".freeze
|
176
|
+
|
177
|
+
# Default gem repositories
|
178
|
+
DEFAULT_GEM_SOURCES = [
|
179
|
+
HASHICORP_GEMSTORE,
|
180
|
+
"https://rubygems.org/".freeze
|
181
|
+
].freeze
|
182
|
+
|
183
|
+
def self.instance
|
184
|
+
@bundler ||= self.new
|
185
|
+
end
|
186
|
+
|
187
|
+
# @return [Pathname] Global plugin path
|
188
|
+
attr_reader :plugin_gem_path
|
189
|
+
# @return [Pathname] Global plugin solution set path
|
190
|
+
attr_reader :plugin_solution_path
|
191
|
+
# @return [Pathname] Vagrant environment specific plugin path
|
192
|
+
attr_reader :env_plugin_gem_path
|
193
|
+
# @return [Pathname] Vagrant environment data path
|
194
|
+
attr_reader :environment_data_path
|
195
|
+
# @return [Array<Gem::Specification>, nil] List of builtin specs
|
196
|
+
attr_accessor :builtin_specs
|
197
|
+
|
198
|
+
def initialize
|
199
|
+
@builtin_specs = []
|
200
|
+
@plugin_gem_path = Vagrant.user_data_path.join("gems", RUBY_VERSION).freeze
|
201
|
+
@logger = Log4r::Logger.new("vagrant::bundler")
|
202
|
+
end
|
203
|
+
|
204
|
+
# Enable Vagrant environment specific plugins at given data path
|
205
|
+
#
|
206
|
+
# @param [Pathname] Path to Vagrant::Environment data directory
|
207
|
+
# @return [Pathname] Path to environment specific gem directory
|
208
|
+
def environment_path=(env_data_path)
|
209
|
+
if !env_data_path.is_a?(Pathname)
|
210
|
+
raise TypeError, "Expected `Pathname` but received `#{env_data_path.class}`"
|
211
|
+
end
|
212
|
+
@env_plugin_gem_path = env_data_path.join("plugins", "gems", RUBY_VERSION).freeze
|
213
|
+
@environment_data_path = env_data_path
|
214
|
+
end
|
215
|
+
|
216
|
+
# Use the given options to create a solution file instance
|
217
|
+
# for use during initialization. When a Vagrant environment
|
218
|
+
# is in use, solution files will be stored within the environment's
|
219
|
+
# data directory. This is because the solution for loading global
|
220
|
+
# plugins is dependent on any solution generated for local plugins.
|
221
|
+
# When no Vagrant environment is in use (running Vagrant without a
|
222
|
+
# Vagrantfile), the Vagrant user data path will be used for solution
|
223
|
+
# storage since only the global plugins will be used.
|
224
|
+
#
|
225
|
+
# @param [Hash] opts Options passed to #init!
|
226
|
+
# @return [SolutionFile]
|
227
|
+
def load_solution_file(opts={})
|
228
|
+
return if !opts[:local] && !opts[:global]
|
229
|
+
return if opts[:local] && opts[:global]
|
230
|
+
return if opts[:local] && environment_data_path.nil?
|
231
|
+
solution_path = (environment_data_path || Vagrant.user_data_path) + "bundler"
|
232
|
+
solution_path += opts[:local] ? "local.sol" : "global.sol"
|
233
|
+
SolutionFile.new(
|
234
|
+
plugin_file: opts[:local] || opts[:global],
|
235
|
+
solution_file: solution_path
|
236
|
+
)
|
237
|
+
end
|
238
|
+
|
239
|
+
# Initializes Bundler and the various gem paths so that we can begin
|
240
|
+
# loading gems.
|
241
|
+
def init!(plugins, repair=false, **opts)
|
242
|
+
if !@initial_specifications
|
243
|
+
@initial_specifications = Gem::Specification.find_all{true}
|
244
|
+
else
|
245
|
+
Gem::Specification.all = @initial_specifications
|
246
|
+
Gem::Specification.reset
|
247
|
+
end
|
248
|
+
|
249
|
+
solution_file = load_solution_file(opts)
|
250
|
+
@logger.debug("solution file in use for init: #{solution_file}")
|
251
|
+
|
252
|
+
solution = nil
|
253
|
+
composed_set = generate_vagrant_set
|
254
|
+
|
255
|
+
# Force the composed set to allow prereleases
|
256
|
+
if Vagrant.allow_prerelease_dependencies?
|
257
|
+
@logger.debug("enabling prerelease dependency matching due to user request")
|
258
|
+
composed_set.prerelease = true
|
259
|
+
end
|
260
|
+
|
261
|
+
if solution_file&.valid?
|
262
|
+
@logger.debug("loading cached solution set")
|
263
|
+
solution = solution_file.dependency_list.map do |dep|
|
264
|
+
spec = composed_set.find_all(dep).select do |dep_spec|
|
265
|
+
next(true) unless Gem.loaded_specs.has_key?(dep_spec.name)
|
266
|
+
|
267
|
+
Gem.loaded_specs[dep_spec.name].version.eql?(dep_spec.version)
|
268
|
+
end.first
|
269
|
+
|
270
|
+
if !spec
|
271
|
+
@logger.warn("failed to locate specification for dependency - #{dep}")
|
272
|
+
@logger.warn("invalidating solution file - #{solution_file}")
|
273
|
+
solution_file.invalidate!
|
274
|
+
break
|
275
|
+
end
|
276
|
+
dep_r = Gem::Resolver::DependencyRequest.new(dep, nil)
|
277
|
+
Gem::Resolver::ActivationRequest.new(spec, dep_r)
|
278
|
+
end
|
279
|
+
end
|
280
|
+
|
281
|
+
if !solution_file&.valid?
|
282
|
+
@logger.debug("generating solution set for configured plugins")
|
283
|
+
# Add HashiCorp RubyGems source
|
284
|
+
if !Gem.sources.include?(HASHICORP_GEMSTORE)
|
285
|
+
sources = [HASHICORP_GEMSTORE] + Gem.sources.sources
|
286
|
+
Gem.sources.replace(sources)
|
287
|
+
end
|
288
|
+
|
289
|
+
# Generate dependencies for all registered plugins
|
290
|
+
plugin_deps = plugins.map do |name, info|
|
291
|
+
Gem::Dependency.new(name, info['installed_gem_version'].to_s.empty? ? '> 0' : info['installed_gem_version'])
|
292
|
+
end
|
293
|
+
|
294
|
+
@logger.debug("Current generated plugin dependency list: #{plugin_deps}")
|
295
|
+
|
296
|
+
# Load dependencies into a request set for resolution
|
297
|
+
request_set = Gem::RequestSet.new(*plugin_deps)
|
298
|
+
# Never allow dependencies to be remotely satisfied during init
|
299
|
+
request_set.remote = false
|
300
|
+
|
301
|
+
begin
|
302
|
+
@logger.debug("resolving solution from available specification set")
|
303
|
+
# Resolve the request set to ensure proper activation order
|
304
|
+
solution = request_set.resolve(composed_set)
|
305
|
+
@logger.debug("solution set for configured plugins has been resolved")
|
306
|
+
rescue Gem::UnsatisfiableDependencyError => failure
|
307
|
+
if repair
|
308
|
+
raise failure if @init_retried
|
309
|
+
@logger.debug("Resolution failed but attempting to repair. Failure: #{failure}")
|
310
|
+
install(plugins)
|
311
|
+
@init_retried = true
|
312
|
+
retry
|
313
|
+
else
|
314
|
+
raise
|
315
|
+
end
|
316
|
+
end
|
317
|
+
end
|
318
|
+
|
319
|
+
# Activate the gems
|
320
|
+
@logger.debug("activating solution set")
|
321
|
+
activate_solution(solution)
|
322
|
+
|
323
|
+
if solution_file && !solution_file.valid?
|
324
|
+
solution_file.dependency_list = solution.map do |activation|
|
325
|
+
activation.request.dependency
|
326
|
+
end
|
327
|
+
solution_file.store!
|
328
|
+
@logger.debug("solution set stored to - #{solution_file}")
|
329
|
+
end
|
330
|
+
|
331
|
+
full_vagrant_spec_list = @initial_specifications +
|
332
|
+
solution.map(&:full_spec)
|
333
|
+
|
334
|
+
if(defined?(::Bundler))
|
335
|
+
@logger.debug("Updating Bundler with full specification list")
|
336
|
+
::Bundler.rubygems.replace_entrypoints(full_vagrant_spec_list)
|
337
|
+
end
|
338
|
+
|
339
|
+
Gem.post_reset do
|
340
|
+
Gem::Specification.all = full_vagrant_spec_list
|
341
|
+
end
|
342
|
+
|
343
|
+
Gem::Specification.reset
|
344
|
+
nil
|
345
|
+
end
|
346
|
+
|
347
|
+
# Removes any temporary files created by init
|
348
|
+
def deinit
|
349
|
+
# no-op
|
350
|
+
end
|
351
|
+
|
352
|
+
# Installs the list of plugins.
|
353
|
+
#
|
354
|
+
# @param [Hash] plugins
|
355
|
+
# @param [Boolean] env_local Environment local plugin install
|
356
|
+
# @return [Array<Gem::Specification>]
|
357
|
+
def install(plugins, env_local=false)
|
358
|
+
internal_install(plugins, nil, env_local: env_local)
|
359
|
+
end
|
360
|
+
|
361
|
+
# Installs a local '*.gem' file so that Bundler can find it.
|
362
|
+
#
|
363
|
+
# @param [String] path Path to a local gem file.
|
364
|
+
# @return [Gem::Specification]
|
365
|
+
def install_local(path, opts={})
|
366
|
+
plugin_source = Gem::Source::SpecificFile.new(path)
|
367
|
+
plugin_info = {
|
368
|
+
plugin_source.spec.name => {
|
369
|
+
"gem_version" => plugin_source.spec.version.to_s,
|
370
|
+
"local_source" => plugin_source,
|
371
|
+
"sources" => opts.fetch(:sources, [])
|
372
|
+
}
|
373
|
+
}
|
374
|
+
@logger.debug("Installing local plugin - #{plugin_info}")
|
375
|
+
internal_install(plugin_info, nil, env_local: opts[:env_local])
|
376
|
+
plugin_source.spec
|
377
|
+
end
|
378
|
+
|
379
|
+
# Update updates the given plugins, or every plugin if none is given.
|
380
|
+
#
|
381
|
+
# @param [Hash] plugins
|
382
|
+
# @param [Array<String>] specific Specific plugin names to update. If
|
383
|
+
# empty or nil, all plugins will be updated.
|
384
|
+
def update(plugins, specific, **opts)
|
385
|
+
specific ||= []
|
386
|
+
update = opts.merge({gems: specific.empty? ? true : specific})
|
387
|
+
internal_install(plugins, update)
|
388
|
+
end
|
389
|
+
|
390
|
+
# Clean removes any unused gems.
|
391
|
+
def clean(plugins, **opts)
|
392
|
+
@logger.debug("Cleaning Vagrant plugins of stale gems.")
|
393
|
+
# Generate dependencies for all registered plugins
|
394
|
+
plugin_deps = plugins.map do |name, info|
|
395
|
+
gem_version = info['installed_gem_version']
|
396
|
+
gem_version = info['gem_version'] if gem_version.to_s.empty?
|
397
|
+
gem_version = "> 0" if gem_version.to_s.empty?
|
398
|
+
Gem::Dependency.new(name, gem_version)
|
399
|
+
end
|
400
|
+
|
401
|
+
@logger.debug("Current plugin dependency list: #{plugin_deps}")
|
402
|
+
|
403
|
+
# Load dependencies into a request set for resolution
|
404
|
+
request_set = Gem::RequestSet.new(*plugin_deps)
|
405
|
+
# Never allow dependencies to be remotely satisfied during cleaning
|
406
|
+
request_set.remote = false
|
407
|
+
|
408
|
+
# Sets that we can resolve our dependencies from. Note that we only
|
409
|
+
# resolve from the current set as all required deps are activated during
|
410
|
+
# init.
|
411
|
+
current_set = generate_vagrant_set
|
412
|
+
|
413
|
+
# Collect all plugin specifications
|
414
|
+
plugin_specs = Dir.glob(plugin_gem_path.join('specifications/*.gemspec').to_s).map do |spec_path|
|
415
|
+
Gem::Specification.load(spec_path)
|
416
|
+
end
|
417
|
+
|
418
|
+
# Include environment specific specification if enabled
|
419
|
+
if env_plugin_gem_path
|
420
|
+
plugin_specs += Dir.glob(env_plugin_gem_path.join('specifications/*.gemspec').to_s).map do |spec_path|
|
421
|
+
Gem::Specification.load(spec_path)
|
422
|
+
end
|
423
|
+
end
|
424
|
+
|
425
|
+
@logger.debug("Generating current plugin state solution set.")
|
426
|
+
|
427
|
+
# Resolve the request set to ensure proper activation order
|
428
|
+
solution = request_set.resolve(current_set)
|
429
|
+
solution_specs = solution.map(&:full_spec)
|
430
|
+
solution_full_names = solution_specs.map(&:full_name)
|
431
|
+
|
432
|
+
# Find all specs installed to plugins directory that are not
|
433
|
+
# found within the solution set.
|
434
|
+
plugin_specs.delete_if do |spec|
|
435
|
+
solution_full_names.include?(spec.full_name)
|
436
|
+
end
|
437
|
+
|
438
|
+
if env_plugin_gem_path
|
439
|
+
# If we are cleaning locally, remove any global specs. If
|
440
|
+
# not, remove any local specs
|
441
|
+
if opts[:env_local]
|
442
|
+
@logger.debug("Removing specifications that are not environment local")
|
443
|
+
plugin_specs.delete_if do |spec|
|
444
|
+
spec.full_gem_path.to_s.include?(plugin_gem_path.realpath.to_s)
|
445
|
+
end
|
446
|
+
else
|
447
|
+
@logger.debug("Removing specifications that are environment local")
|
448
|
+
plugin_specs.delete_if do |spec|
|
449
|
+
spec.full_gem_path.to_s.include?(env_plugin_gem_path.realpath.to_s)
|
450
|
+
end
|
451
|
+
end
|
452
|
+
end
|
453
|
+
|
454
|
+
@logger.debug("Specifications to be removed - #{plugin_specs.map(&:full_name)}")
|
455
|
+
|
456
|
+
# Now delete all unused specs
|
457
|
+
plugin_specs.each do |spec|
|
458
|
+
@logger.debug("Uninstalling gem - #{spec.full_name}")
|
459
|
+
Gem::Uninstaller.new(spec.name,
|
460
|
+
version: spec.version,
|
461
|
+
install_dir: plugin_gem_path,
|
462
|
+
all: true,
|
463
|
+
executables: true,
|
464
|
+
force: true,
|
465
|
+
ignore: true,
|
466
|
+
).uninstall_gem(spec)
|
467
|
+
end
|
468
|
+
|
469
|
+
solution.find_all do |spec|
|
470
|
+
plugins.keys.include?(spec.name)
|
471
|
+
end
|
472
|
+
end
|
473
|
+
|
474
|
+
# During the duration of the yielded block, Bundler loud output
|
475
|
+
# is enabled.
|
476
|
+
def verbose
|
477
|
+
if block_given?
|
478
|
+
initial_state = @verbose
|
479
|
+
@verbose = true
|
480
|
+
yield
|
481
|
+
@verbose = initial_state
|
482
|
+
else
|
483
|
+
@verbose = true
|
484
|
+
end
|
485
|
+
end
|
486
|
+
|
487
|
+
protected
|
488
|
+
|
489
|
+
def internal_install(plugins, update, **extra)
|
490
|
+
update = {} if !update.is_a?(Hash)
|
491
|
+
skips = []
|
492
|
+
source_list = {}
|
493
|
+
system_plugins = plugins.map do |plugin_name, plugin_info|
|
494
|
+
plugin_name if plugin_info["system"]
|
495
|
+
end.compact
|
496
|
+
installer_set = VagrantSet.new(:both)
|
497
|
+
installer_set.system_plugins = system_plugins
|
498
|
+
|
499
|
+
# Generate all required plugin deps
|
500
|
+
plugin_deps = plugins.map do |name, info|
|
501
|
+
gem_version = info['gem_version'].to_s.empty? ? '> 0' : info['gem_version']
|
502
|
+
if update[:gems] == true || (update[:gems].respond_to?(:include?) && update[:gems].include?(name))
|
503
|
+
if Gem::Requirement.new(gem_version).exact?
|
504
|
+
gem_version = "> 0"
|
505
|
+
@logger.debug("Detected exact version match for `#{name}` plugin update. Reset to loosen constraint #{gem_version.inspect}.")
|
506
|
+
end
|
507
|
+
skips << name
|
508
|
+
end
|
509
|
+
source_list[name] ||= []
|
510
|
+
if plugin_source = info.delete("local_source")
|
511
|
+
installer_set.add_local(plugin_source.spec.name, plugin_source.spec, plugin_source)
|
512
|
+
source_list[name] << plugin_source.path
|
513
|
+
end
|
514
|
+
Array(info["sources"]).each do |source|
|
515
|
+
if !source.end_with?("/")
|
516
|
+
source = source + "/"
|
517
|
+
end
|
518
|
+
source_list[name] << source
|
519
|
+
end
|
520
|
+
Gem::Dependency.new(name, *gem_version.split(","))
|
521
|
+
end
|
522
|
+
|
523
|
+
if Vagrant.strict_dependency_enforcement
|
524
|
+
@logger.debug("Enabling strict dependency enforcement")
|
525
|
+
plugin_deps += vagrant_internal_specs.map do |spec|
|
526
|
+
# NOTE: When working within bundler, skip any system plugins and
|
527
|
+
# default gems. However, when not within bundler (in the installer)
|
528
|
+
# include them as strict dependencies to prevent the resolver from
|
529
|
+
# attempting to create a solution with a newer version. The request
|
530
|
+
# set does allow for resolving conservatively but it can't be set
|
531
|
+
# from the public API (requires an instance variable set on the resolver
|
532
|
+
# instance) so strict dependencies are used instead.
|
533
|
+
if Vagrant.in_bundler?
|
534
|
+
next if system_plugins.include?(spec.name)
|
535
|
+
# # If this spec is for a default plugin included in
|
536
|
+
# # the ruby stdlib, ignore it
|
537
|
+
next if spec.default_gem?
|
538
|
+
end
|
539
|
+
|
540
|
+
# If we are not running within the installer and
|
541
|
+
# we are not within a bundler environment then we
|
542
|
+
# only want activated specs
|
543
|
+
if !Vagrant.in_installer? && !Vagrant.in_bundler?
|
544
|
+
next if !spec.activated?
|
545
|
+
end
|
546
|
+
Gem::Dependency.new(spec.name, spec.version)
|
547
|
+
end.compact
|
548
|
+
else
|
549
|
+
@logger.debug("Disabling strict dependency enforcement")
|
550
|
+
end
|
551
|
+
|
552
|
+
@logger.debug("Dependency list for installation:\n - " \
|
553
|
+
"#{plugin_deps.map{|d| "#{d.name} #{d.requirement}"}.join("\n - ")}")
|
554
|
+
|
555
|
+
all_sources = source_list.values.flatten.uniq
|
556
|
+
default_sources = DEFAULT_GEM_SOURCES & all_sources
|
557
|
+
all_sources -= DEFAULT_GEM_SOURCES
|
558
|
+
|
559
|
+
# Only allow defined Gem sources
|
560
|
+
Gem.sources.clear
|
561
|
+
|
562
|
+
@logger.debug("Enabling user defined remote RubyGems sources")
|
563
|
+
all_sources.each do |src|
|
564
|
+
begin
|
565
|
+
next if File.file?(src) || URI.parse(src).scheme.nil?
|
566
|
+
rescue URI::InvalidURIError
|
567
|
+
next
|
568
|
+
end
|
569
|
+
@logger.debug("Adding RubyGems source #{src}")
|
570
|
+
Gem.sources << src
|
571
|
+
end
|
572
|
+
|
573
|
+
@logger.debug("Enabling default remote RubyGems sources")
|
574
|
+
default_sources.each do |src|
|
575
|
+
@logger.debug("Adding source - #{src}")
|
576
|
+
Gem.sources << src
|
577
|
+
end
|
578
|
+
|
579
|
+
validate_configured_sources!
|
580
|
+
|
581
|
+
source_list.values.each{|srcs| srcs.delete_if{|src| default_sources.include?(src)}}
|
582
|
+
installer_set.prefer_sources = source_list
|
583
|
+
|
584
|
+
@logger.debug("Current source list for install: #{Gem.sources.to_a}")
|
585
|
+
|
586
|
+
# Create the request set for the new plugins
|
587
|
+
request_set = Gem::RequestSet.new(*plugin_deps)
|
588
|
+
|
589
|
+
installer_set = Gem::Resolver.compose_sets(
|
590
|
+
installer_set,
|
591
|
+
generate_builtin_set(system_plugins),
|
592
|
+
generate_plugin_set(skips)
|
593
|
+
)
|
594
|
+
|
595
|
+
if Vagrant.allow_prerelease_dependencies?
|
596
|
+
@logger.debug("enabling prerelease dependency matching based on user request")
|
597
|
+
request_set.prerelease = true
|
598
|
+
installer_set.prerelease = true
|
599
|
+
end
|
600
|
+
|
601
|
+
@logger.debug("Generating solution set for installation.")
|
602
|
+
|
603
|
+
# Generate the required solution set for new plugins
|
604
|
+
solution = request_set.resolve(installer_set)
|
605
|
+
|
606
|
+
activate_solution(solution)
|
607
|
+
|
608
|
+
# Remove gems which are already installed
|
609
|
+
request_set.sorted_requests.delete_if do |act_req|
|
610
|
+
rs = act_req.spec
|
611
|
+
if vagrant_internal_specs.detect{ |i| i.name == rs.name && i.version == rs.version }
|
612
|
+
@logger.debug("Removing activation request from install. Already installed. (#{rs.spec.full_name})")
|
613
|
+
true
|
614
|
+
end
|
615
|
+
end
|
616
|
+
|
617
|
+
@logger.debug("Installing required gems.")
|
618
|
+
|
619
|
+
# Install all remote gems into plugin path. Set the installer to ignore dependencies
|
620
|
+
# as we know the dependencies are satisfied and it will attempt to validate a gem's
|
621
|
+
# dependencies are satisfied by gems in the install directory (which will likely not
|
622
|
+
# be true)
|
623
|
+
install_path = extra[:env_local] ? env_plugin_gem_path : plugin_gem_path
|
624
|
+
result = request_set.install_into(install_path.to_s, true,
|
625
|
+
ignore_dependencies: true,
|
626
|
+
prerelease: Vagrant.prerelease? || Vagrant.allow_prerelease_dependencies?,
|
627
|
+
wrappers: true,
|
628
|
+
document: []
|
629
|
+
)
|
630
|
+
|
631
|
+
result = result.map(&:full_spec)
|
632
|
+
result.each do |spec|
|
633
|
+
existing_paths = $LOAD_PATH.find_all{|s| s.include?(spec.full_name) }
|
634
|
+
if !existing_paths.empty?
|
635
|
+
@logger.debug("Removing existing LOAD_PATHs for #{spec.full_name} - " +
|
636
|
+
existing_paths.join(", "))
|
637
|
+
existing_paths.each{|s| $LOAD_PATH.delete(s) }
|
638
|
+
end
|
639
|
+
spec.full_require_paths.each do |r_path|
|
640
|
+
if !$LOAD_PATH.include?(r_path)
|
641
|
+
@logger.debug("Adding path to LOAD_PATH - #{r_path}")
|
642
|
+
$LOAD_PATH.unshift(r_path)
|
643
|
+
end
|
644
|
+
end
|
645
|
+
end
|
646
|
+
result
|
647
|
+
end
|
648
|
+
|
649
|
+
# Generate the composite resolver set totally all of vagrant (builtin + plugin set)
|
650
|
+
def generate_vagrant_set
|
651
|
+
sets = [generate_builtin_set, generate_plugin_set]
|
652
|
+
if env_plugin_gem_path && env_plugin_gem_path.exist?
|
653
|
+
sets << generate_plugin_set(env_plugin_gem_path)
|
654
|
+
end
|
655
|
+
Gem::Resolver.compose_sets(*sets)
|
656
|
+
end
|
657
|
+
|
658
|
+
# @return [Array<[Gem::Specification]>] spec list
|
659
|
+
def vagrant_internal_specs
|
660
|
+
# activate any dependencies up front so we can always
|
661
|
+
# pin them when resolving
|
662
|
+
self_spec = Gem::Specification.find { |s| s.name == "vagrant" && s.activated? }
|
663
|
+
if !self_spec
|
664
|
+
@logger.warn("Failed to locate activated vagrant specification. Activating...")
|
665
|
+
self_spec = Gem::Specification.find { |s| s.name == "vagrant" }
|
666
|
+
if !self_spec
|
667
|
+
@logger.error("Failed to locate Vagrant RubyGem specification")
|
668
|
+
raise Vagrant::Errors::SourceSpecNotFound
|
669
|
+
end
|
670
|
+
self_spec.activate
|
671
|
+
@logger.info("Activated vagrant specification version - #{self_spec.version}")
|
672
|
+
end
|
673
|
+
# discover all the gems we have available
|
674
|
+
list = {}
|
675
|
+
if Gem.respond_to?(:default_specifications_dir)
|
676
|
+
spec_dir = Gem.default_specifications_dir
|
677
|
+
else
|
678
|
+
spec_dir = Gem::Specification.default_specifications_dir
|
679
|
+
end
|
680
|
+
directories = [spec_dir]
|
681
|
+
if Vagrant.in_bundler?
|
682
|
+
Gem::Specification.find_all{true}.each do |spec|
|
683
|
+
list[spec.full_name] = spec
|
684
|
+
end
|
685
|
+
else
|
686
|
+
builtin_specs.each do |spec|
|
687
|
+
list[spec.full_name] = spec
|
688
|
+
end
|
689
|
+
end
|
690
|
+
if Vagrant.in_installer?
|
691
|
+
directories += Gem::Specification.dirs.find_all do |path|
|
692
|
+
!path.start_with?(Gem.user_dir)
|
693
|
+
end
|
694
|
+
end
|
695
|
+
Gem::Specification.each_spec(directories) do |spec|
|
696
|
+
if !list[spec.full_name]
|
697
|
+
list[spec.full_name] = spec
|
698
|
+
end
|
699
|
+
end
|
700
|
+
list.values
|
701
|
+
end
|
702
|
+
|
703
|
+
# Iterates each configured RubyGem source to validate that it is properly
|
704
|
+
# available. If source is unavailable an exception is raised.
|
705
|
+
def validate_configured_sources!
|
706
|
+
Gem.sources.each_source do |src|
|
707
|
+
begin
|
708
|
+
src.load_specs(:released)
|
709
|
+
rescue Gem::Exception => source_error
|
710
|
+
if ENV["VAGRANT_ALLOW_PLUGIN_SOURCE_ERRORS"]
|
711
|
+
@logger.warn("Failed to load configured plugin source: #{src}!")
|
712
|
+
@logger.warn("Error received attempting to load source (#{src}): #{source_error}")
|
713
|
+
@logger.warn("Ignoring plugin source load failure due user request via env variable")
|
714
|
+
else
|
715
|
+
@logger.error("Failed to load configured plugin source `#{src}`: #{source_error}")
|
716
|
+
raise Vagrant::Errors::PluginSourceError,
|
717
|
+
source: src.uri.to_s,
|
718
|
+
error_msg: source_error.message
|
719
|
+
end
|
720
|
+
end
|
721
|
+
end
|
722
|
+
end
|
723
|
+
|
724
|
+
# Generate the builtin resolver set
|
725
|
+
def generate_builtin_set(system_plugins=[])
|
726
|
+
builtin_set = BuiltinSet.new
|
727
|
+
@logger.debug("Generating new builtin set instance.")
|
728
|
+
vagrant_internal_specs.each do |spec|
|
729
|
+
if !system_plugins.include?(spec.name)
|
730
|
+
builtin_set.add_builtin_spec(spec)
|
731
|
+
end
|
732
|
+
end
|
733
|
+
builtin_set
|
734
|
+
end
|
735
|
+
|
736
|
+
# Generate the plugin resolver set. Optionally provide specification names (short or
|
737
|
+
# full) that should be ignored
|
738
|
+
#
|
739
|
+
# @param [Pathname] path to plugins
|
740
|
+
# @param [Array<String>] gems to skip
|
741
|
+
# @return [PluginSet]
|
742
|
+
def generate_plugin_set(*args)
|
743
|
+
plugin_path = args.detect{|i| i.is_a?(Pathname) } || plugin_gem_path
|
744
|
+
skip = args.detect{|i| i.is_a?(Array) } || []
|
745
|
+
plugin_set = PluginSet.new
|
746
|
+
@logger.debug("Generating new plugin set instance. Skip gems - #{skip}")
|
747
|
+
Dir.glob(plugin_path.join('specifications/*.gemspec').to_s).each do |spec_path|
|
748
|
+
spec = Gem::Specification.load(spec_path)
|
749
|
+
desired_spec_path = File.join(spec.gem_dir, "#{spec.name}.gemspec")
|
750
|
+
# Vendor set requires the spec to be within the gem directory. Some gems will package their
|
751
|
+
# spec file, and that's not what we want to load.
|
752
|
+
if !File.exist?(desired_spec_path) || !FileUtils.cmp(spec.spec_file, desired_spec_path)
|
753
|
+
File.write(desired_spec_path, spec.to_ruby)
|
754
|
+
end
|
755
|
+
next if skip.include?(spec.name) || skip.include?(spec.full_name)
|
756
|
+
plugin_set.add_vendor_gem(spec.name, spec.gem_dir)
|
757
|
+
end
|
758
|
+
plugin_set
|
759
|
+
end
|
760
|
+
|
761
|
+
# Activate a given solution
|
762
|
+
def activate_solution(solution)
|
763
|
+
retried = false
|
764
|
+
begin
|
765
|
+
@logger.debug("Activating solution set: #{solution.map(&:full_name)}")
|
766
|
+
solution.each do |activation_request|
|
767
|
+
unless activation_request.full_spec.activated?
|
768
|
+
@logger.debug("Activating gem #{activation_request.full_spec.full_name}")
|
769
|
+
activation_request.full_spec.activate
|
770
|
+
if(defined?(::Bundler))
|
771
|
+
@logger.debug("Marking gem #{activation_request.full_spec.full_name} loaded within Bundler.")
|
772
|
+
::Bundler.rubygems.mark_loaded activation_request.full_spec
|
773
|
+
end
|
774
|
+
end
|
775
|
+
end
|
776
|
+
rescue Gem::LoadError => e
|
777
|
+
# Depending on the version of Ruby, the ordering of the solution set
|
778
|
+
# will be either 0..n (molinillo) or n..0 (pre-molinillo). Instead of
|
779
|
+
# attempting to determine what's in use, or if it has some how changed
|
780
|
+
# again, just reverse order on failure and attempt again.
|
781
|
+
if retried
|
782
|
+
@logger.error("Failed to load solution set - #{e.class}: #{e}")
|
783
|
+
matcher = e.message.match(/Could not find '(?<gem_name>[^']+)'/)
|
784
|
+
if matcher && !matcher["gem_name"].empty?
|
785
|
+
desired_activation_request = solution.detect do |request|
|
786
|
+
request.name == matcher["gem_name"]
|
787
|
+
end
|
788
|
+
if desired_activation_request && !desired_activation_request.full_spec.activated?
|
789
|
+
@logger.warn("Found misordered activation request for #{desired_activation_request.full_name}. Moving to solution HEAD.")
|
790
|
+
solution.delete(desired_activation_request)
|
791
|
+
solution.unshift(desired_activation_request)
|
792
|
+
retry
|
793
|
+
end
|
794
|
+
end
|
795
|
+
|
796
|
+
raise
|
797
|
+
else
|
798
|
+
@logger.debug("Failed to load solution set. Retrying with reverse order.")
|
799
|
+
retried = true
|
800
|
+
solution.reverse!
|
801
|
+
retry
|
802
|
+
end
|
803
|
+
end
|
804
|
+
end
|
805
|
+
|
806
|
+
# This is a custom Gem::Resolver::InstallerSet. It will prefer sources which are
|
807
|
+
# explicitly provided over default sources when matches are found. This is generally
|
808
|
+
# the entire set used for performing full resolutions on install.
|
809
|
+
class VagrantSet < Gem::Resolver::InstallerSet
|
810
|
+
attr_accessor :prefer_sources
|
811
|
+
attr_accessor :system_plugins
|
812
|
+
|
813
|
+
def initialize(domain, defined_sources={})
|
814
|
+
@prefer_sources = defined_sources
|
815
|
+
@system_plugins = []
|
816
|
+
super(domain)
|
817
|
+
end
|
818
|
+
|
819
|
+
# Allow InstallerSet to find matching specs, then filter
|
820
|
+
# for preferred sources
|
821
|
+
def find_all(req)
|
822
|
+
result = super
|
823
|
+
if system_plugins.include?(req.name)
|
824
|
+
result.delete_if do |spec|
|
825
|
+
spec.is_a?(Gem::Resolver::InstalledSpecification)
|
826
|
+
end
|
827
|
+
end
|
828
|
+
subset = result.find_all do |idx_spec|
|
829
|
+
preferred = false
|
830
|
+
if prefer_sources[req.name]
|
831
|
+
if idx_spec.source.respond_to?(:path)
|
832
|
+
preferred = prefer_sources[req.name].include?(idx_spec.source.path.to_s)
|
833
|
+
end
|
834
|
+
if !preferred
|
835
|
+
preferred = prefer_sources[req.name].include?(idx_spec.source.uri.to_s)
|
836
|
+
end
|
837
|
+
end
|
838
|
+
preferred
|
839
|
+
end
|
840
|
+
subset.empty? ? result : subset
|
841
|
+
end
|
842
|
+
end
|
843
|
+
|
844
|
+
# This is a custom Gem::Resolver::Set for use with vagrant "system" gems. It
|
845
|
+
# allows the installed set of gems to be used for providing a solution while
|
846
|
+
# enforcing strict constraints. This ensures that plugins cannot "upgrade"
|
847
|
+
# gems that are builtin to vagrant itself.
|
848
|
+
class BuiltinSet < Gem::Resolver::Set
|
849
|
+
def initialize
|
850
|
+
super
|
851
|
+
@remote = false
|
852
|
+
@specs = []
|
853
|
+
end
|
854
|
+
|
855
|
+
def add_builtin_spec(spec)
|
856
|
+
@specs.push(spec).uniq!
|
857
|
+
end
|
858
|
+
|
859
|
+
def find_all(req)
|
860
|
+
r = @specs.select do |spec|
|
861
|
+
# When matching requests against builtin specs, we _always_ enable
|
862
|
+
# prerelease matching since any prerelease that's found in this
|
863
|
+
# set has been added explicitly and should be available for all
|
864
|
+
# plugins to resolve against. This includes Vagrant itself since
|
865
|
+
# it is considered a prerelease when in development mode
|
866
|
+
req.match?(spec, true)
|
867
|
+
end.map do |spec|
|
868
|
+
Gem::Resolver::InstalledSpecification.new(self, spec)
|
869
|
+
end
|
870
|
+
# If any of the results are a prerelease, we need to mark the request
|
871
|
+
# to allow prereleases so the solution can be properly fulfilled
|
872
|
+
if r.any? { |x| x.version.prerelease? }
|
873
|
+
req.dependency.prerelease = true
|
874
|
+
end
|
875
|
+
r
|
876
|
+
end
|
877
|
+
end
|
878
|
+
|
879
|
+
# This is a custom Gem::Resolver::Set for use with Vagrant plugins. It is
|
880
|
+
# a modified Gem::Resolver::VendorSet that supports multiple versions of
|
881
|
+
# a specific gem
|
882
|
+
class PluginSet < Gem::Resolver::VendorSet
|
883
|
+
##
|
884
|
+
# Adds a specification to the set with the given +name+ which has been
|
885
|
+
# unpacked into the given +directory+.
|
886
|
+
def add_vendor_gem(name, directory)
|
887
|
+
gemspec = File.join(directory, "#{name}.gemspec")
|
888
|
+
spec = Gem::Specification.load(gemspec)
|
889
|
+
if !spec
|
890
|
+
raise Gem::GemNotFoundException,
|
891
|
+
"unable to find #{gemspec} for gem #{name}"
|
892
|
+
end
|
893
|
+
|
894
|
+
spec.full_gem_path = File.expand_path(directory)
|
895
|
+
spec.base_dir = File.dirname(spec.base_dir)
|
896
|
+
|
897
|
+
@specs[spec.name] ||= []
|
898
|
+
@specs[spec.name] << spec
|
899
|
+
@directories[spec] = directory
|
900
|
+
|
901
|
+
spec
|
902
|
+
end
|
903
|
+
|
904
|
+
##
|
905
|
+
# Returns an Array of VendorSpecification objects matching the
|
906
|
+
# DependencyRequest +req+.
|
907
|
+
def find_all(req)
|
908
|
+
@specs.values.flatten.select do |spec|
|
909
|
+
req.match?(spec, prerelease)
|
910
|
+
end.map do |spec|
|
911
|
+
source = Gem::Source::Vendor.new(@directories[spec])
|
912
|
+
Gem::Resolver::VendorSpecification.new(self, spec, source)
|
913
|
+
end
|
914
|
+
end
|
915
|
+
|
916
|
+
##
|
917
|
+
# Loads a spec with the given +name+. +version+, +platform+ and +source+ are
|
918
|
+
# ignored.
|
919
|
+
def load_spec(name, version, platform, source)
|
920
|
+
version = Gem::Version.new(version) if !version.is_a?(Gem::Version)
|
921
|
+
@specs.fetch(name, []).detect{|s| s.name == name && s.version == version}
|
922
|
+
end
|
923
|
+
end
|
924
|
+
end
|
925
|
+
end
|
926
|
+
|
927
|
+
# Patch for Ruby 2.2 and Bundler to behave properly when uninstalling plugins
|
928
|
+
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.3')
|
929
|
+
if defined?(::Bundler) && !::Bundler::SpecSet.instance_methods.include?(:delete)
|
930
|
+
class Gem::Specification
|
931
|
+
def self.remove_spec(spec)
|
932
|
+
Gem::Specification.reset
|
933
|
+
end
|
934
|
+
end
|
935
|
+
end
|
936
|
+
end
|