mirror of
https://github.com/hashicorp/vagrant.git
synced 2026-06-04 22:32:49 -04:00
Update Vagrant behavior outside of installers
Remove customized require behaviors and modify the bin executable to check for missing tools that Vagrant expects to exist when running outside of an installer.
This commit is contained in:
parent
7dcb670661
commit
ea25996b21
319 changed files with 1001 additions and 1051 deletions
20
bin/vagrant
20
bin/vagrant
|
|
@ -187,12 +187,6 @@ begin
|
|||
argv += argv_extra
|
||||
end
|
||||
|
||||
sub_cmd = Class.new(Vagrant.plugin("2", :command)) {
|
||||
def sub_command
|
||||
split_main_and_subcommand(@argv)[1]
|
||||
end
|
||||
}.new(argv.dup, nil).sub_command
|
||||
|
||||
# Create the environment, which is the cwd of wherever the
|
||||
# `vagrant` command was invoked from
|
||||
logger.debug("Creating Vagrant environment")
|
||||
|
|
@ -209,9 +203,17 @@ begin
|
|||
end
|
||||
end
|
||||
|
||||
if !Vagrant.in_installer? && !Vagrant.very_quiet?
|
||||
# If we're not in the installer, warn.
|
||||
env.ui.warn(I18n.t("vagrant.general.not_in_installer") + "\n", prefix: false)
|
||||
# If not being run from the installer, check if expected tools
|
||||
# are available.
|
||||
if !Vagrant.in_installer?
|
||||
missing_tools = Vagrant.detect_missing_tools
|
||||
|
||||
if !missing_tools.empty?
|
||||
env.ui.warn(
|
||||
I18n.t("vagrant.general.not_in_installer", tools: missing_tools.sort.join(", ")) + "\n",
|
||||
prefix: false
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
# Acceptable experimental flag values include:
|
||||
|
|
|
|||
|
|
@ -5,16 +5,16 @@
|
|||
# require helper available.
|
||||
require "vagrant/shared_helpers"
|
||||
|
||||
Vagrant.require "log4r"
|
||||
require "log4r"
|
||||
|
||||
# Add patches to log4r to support trace level
|
||||
Vagrant.require "vagrant/patches/log4r"
|
||||
Vagrant.require "vagrant/patches/net-ssh"
|
||||
Vagrant.require "vagrant/patches/rubygems"
|
||||
Vagrant.require "vagrant/patches/timeout_error"
|
||||
require "vagrant/patches/log4r"
|
||||
require "vagrant/patches/net-ssh"
|
||||
require "vagrant/patches/rubygems"
|
||||
require "vagrant/patches/timeout_error"
|
||||
|
||||
# Set our log levels and include trace
|
||||
Vagrant.require 'log4r/configurator'
|
||||
require 'log4r/configurator'
|
||||
Log4r::Configurator.custom_levels(*(["TRACE"] + Log4r::Log4rConfig::LogLevels))
|
||||
|
||||
# Update the default formatter within the log4r library to ensure
|
||||
|
|
@ -26,7 +26,7 @@ class Log4r::BasicFormatter
|
|||
end
|
||||
end
|
||||
|
||||
Vagrant.require "optparse"
|
||||
require "optparse"
|
||||
|
||||
module Vagrant
|
||||
# This is a customized OptionParser for Vagrant plugins. It
|
||||
|
|
@ -51,9 +51,9 @@ module VagrantPlugins
|
|||
end
|
||||
|
||||
# Load in our helpers and utilities
|
||||
Vagrant.require "rubygems"
|
||||
Vagrant.require "vagrant/util"
|
||||
Vagrant.require "vagrant/plugin/manager"
|
||||
require "rubygems"
|
||||
require "vagrant/util"
|
||||
require "vagrant/plugin/manager"
|
||||
|
||||
# Enable logging if it is requested. We do this before
|
||||
# anything else so that we can setup the output before
|
||||
|
|
@ -110,19 +110,19 @@ if ENV["VAGRANT_LOG"] && ENV["VAGRANT_LOG"] != ""
|
|||
end
|
||||
end
|
||||
|
||||
Vagrant.require 'json'
|
||||
Vagrant.require 'pathname'
|
||||
Vagrant.require 'stringio'
|
||||
require 'json'
|
||||
require 'pathname'
|
||||
require 'stringio'
|
||||
|
||||
Vagrant.require 'childprocess'
|
||||
Vagrant.require 'i18n'
|
||||
require 'childprocess'
|
||||
require 'i18n'
|
||||
|
||||
# OpenSSL must be loaded here since when it is loaded via `autoload`
|
||||
# there are issues with ciphers not being properly loaded.
|
||||
Vagrant.require 'openssl'
|
||||
require 'openssl'
|
||||
|
||||
# Always make the version available
|
||||
Vagrant.require 'vagrant/version'
|
||||
require 'vagrant/version'
|
||||
global_logger = Log4r::Logger.new("vagrant::global")
|
||||
Vagrant.global_logger = global_logger
|
||||
global_logger.info("Vagrant version: #{Vagrant::VERSION}")
|
||||
|
|
@ -143,7 +143,7 @@ vagrant_ssl_locations = [
|
|||
if vagrant_ssl_locations.any? { |f| File.exist?(f) }
|
||||
global_logger.debug("vagrant ssl helper found for loading ssl providers")
|
||||
begin
|
||||
Vagrant.require "vagrant/vagrant_ssl"
|
||||
require "vagrant/vagrant_ssl"
|
||||
Vagrant.vagrant_ssl_load
|
||||
global_logger.debug("ssl providers successfully loaded")
|
||||
rescue LoadError => err
|
||||
|
|
@ -157,8 +157,8 @@ end
|
|||
|
||||
# We need these components always so instead of an autoload we
|
||||
# just require them explicitly here.
|
||||
Vagrant.require "vagrant/plugin"
|
||||
Vagrant.require "vagrant/registry"
|
||||
require "vagrant/plugin"
|
||||
require "vagrant/registry"
|
||||
|
||||
module Vagrant
|
||||
autoload :Action, 'vagrant/action'
|
||||
|
|
@ -235,7 +235,7 @@ module Vagrant
|
|||
end
|
||||
|
||||
# Now check the plugin gem names
|
||||
Vagrant.require "vagrant/plugin/manager"
|
||||
require "vagrant/plugin/manager"
|
||||
Plugin::Manager.instance.plugin_installed?(name, version)
|
||||
end
|
||||
|
||||
|
|
@ -273,7 +273,7 @@ module Vagrant
|
|||
|
||||
# @deprecated
|
||||
def self.require_plugin(name)
|
||||
puts "Vagrant.require_plugin is deprecated and has no effect any longer."
|
||||
puts "require_plugin is deprecated and has no effect any longer."
|
||||
puts "Use `vagrant plugin` commands to manage plugins. This warning will"
|
||||
puts "be removed in the next version of Vagrant."
|
||||
end
|
||||
|
|
@ -297,9 +297,9 @@ module Vagrant
|
|||
#
|
||||
# Examples are shown below:
|
||||
#
|
||||
# Vagrant.require_version(">= 1.3.5")
|
||||
# Vagrant.require_version(">= 1.3.5", "< 1.4.0")
|
||||
# Vagrant.require_version("~> 1.3.5")
|
||||
# require_version(">= 1.3.5")
|
||||
# require_version(">= 1.3.5", "< 1.4.0")
|
||||
# require_version("~> 1.3.5")
|
||||
#
|
||||
def self.require_version(*requirements)
|
||||
logger = Log4r::Logger.new("vagrant::root")
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require 'vagrant/action/builder'
|
||||
require 'vagrant/action/builder'
|
||||
|
||||
module Vagrant
|
||||
module Action
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "digest/sha1"
|
||||
Vagrant.require "log4r"
|
||||
Vagrant.require "pathname"
|
||||
Vagrant.require "uri"
|
||||
require "digest/sha1"
|
||||
require "log4r"
|
||||
require "pathname"
|
||||
require "uri"
|
||||
|
||||
Vagrant.require "vagrant/box_metadata"
|
||||
Vagrant.require "vagrant/util/downloader"
|
||||
Vagrant.require "vagrant/util/file_checksum"
|
||||
Vagrant.require "vagrant/util/file_mutex"
|
||||
Vagrant.require "vagrant/util/platform"
|
||||
require "vagrant/box_metadata"
|
||||
require "vagrant/util/downloader"
|
||||
require "vagrant/util/file_checksum"
|
||||
require "vagrant/util/file_mutex"
|
||||
require "vagrant/util/platform"
|
||||
|
||||
module Vagrant
|
||||
module Action
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "log4r"
|
||||
require "log4r"
|
||||
|
||||
module Vagrant
|
||||
module Action
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "log4r"
|
||||
require "log4r"
|
||||
|
||||
module Vagrant
|
||||
module Action
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "log4r"
|
||||
require "log4r"
|
||||
|
||||
module Vagrant
|
||||
module Action
|
||||
|
|
|
|||
|
|
@ -1,59 +1,59 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "json"
|
||||
|
||||
module Vagrant
|
||||
module Action
|
||||
module Builtin
|
||||
class CleanupDisks
|
||||
# Removes any attached disks no longer defined in a Vagrantfile config
|
||||
def initialize(app, env)
|
||||
@app = app
|
||||
@logger = Log4r::Logger.new("vagrant::action::builtin::disk")
|
||||
end
|
||||
|
||||
def call(env)
|
||||
machine = env[:machine]
|
||||
defined_disks = get_disks(machine, env)
|
||||
|
||||
# Call into providers machine implementation for disk management
|
||||
disk_meta_file = read_disk_metadata(machine)
|
||||
|
||||
if !disk_meta_file.empty?
|
||||
if machine.provider.capability?(:cleanup_disks)
|
||||
machine.provider.capability(:cleanup_disks, defined_disks, disk_meta_file)
|
||||
else
|
||||
env[:ui].warn(I18n.t("vagrant.actions.disk.provider_unsupported",
|
||||
provider: machine.provider_name))
|
||||
end
|
||||
end
|
||||
|
||||
# Continue On
|
||||
@app.call(env)
|
||||
end
|
||||
|
||||
def read_disk_metadata(machine)
|
||||
meta_file = machine.data_dir.join("disk_meta")
|
||||
if File.file?(meta_file)
|
||||
disk_meta = JSON.parse(meta_file.read)
|
||||
else
|
||||
@logger.info("No previous disk_meta file defined for guest #{machine.name}")
|
||||
disk_meta = {}
|
||||
end
|
||||
|
||||
return disk_meta
|
||||
end
|
||||
|
||||
def get_disks(machine, env)
|
||||
return @_disks if @_disks
|
||||
|
||||
@_disks = []
|
||||
@_disks = machine.config.vm.disks
|
||||
|
||||
@_disks
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
require "json"
|
||||
|
||||
module Vagrant
|
||||
module Action
|
||||
module Builtin
|
||||
class CleanupDisks
|
||||
# Removes any attached disks no longer defined in a Vagrantfile config
|
||||
def initialize(app, env)
|
||||
@app = app
|
||||
@logger = Log4r::Logger.new("vagrant::action::builtin::disk")
|
||||
end
|
||||
|
||||
def call(env)
|
||||
machine = env[:machine]
|
||||
defined_disks = get_disks(machine, env)
|
||||
|
||||
# Call into providers machine implementation for disk management
|
||||
disk_meta_file = read_disk_metadata(machine)
|
||||
|
||||
if !disk_meta_file.empty?
|
||||
if machine.provider.capability?(:cleanup_disks)
|
||||
machine.provider.capability(:cleanup_disks, defined_disks, disk_meta_file)
|
||||
else
|
||||
env[:ui].warn(I18n.t("vagrant.actions.disk.provider_unsupported",
|
||||
provider: machine.provider_name))
|
||||
end
|
||||
end
|
||||
|
||||
# Continue On
|
||||
@app.call(env)
|
||||
end
|
||||
|
||||
def read_disk_metadata(machine)
|
||||
meta_file = machine.data_dir.join("disk_meta")
|
||||
if File.file?(meta_file)
|
||||
disk_meta = JSON.parse(meta_file.read)
|
||||
else
|
||||
@logger.info("No previous disk_meta file defined for guest #{machine.name}")
|
||||
disk_meta = {}
|
||||
end
|
||||
|
||||
return disk_meta
|
||||
end
|
||||
|
||||
def get_disks(machine, env)
|
||||
return @_disks if @_disks
|
||||
|
||||
@_disks = []
|
||||
@_disks = machine.config.vm.disks
|
||||
|
||||
@_disks
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,125 +1,125 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require 'vagrant/util/mime'
|
||||
Vagrant.require 'tmpdir'
|
||||
|
||||
module Vagrant
|
||||
module Action
|
||||
module Builtin
|
||||
class CloudInitSetup
|
||||
TEMP_PREFIX = "vagrant-cloud-init-iso-temp-".freeze
|
||||
|
||||
def initialize(app, env)
|
||||
@app = app
|
||||
@logger = Log4r::Logger.new("vagrant::action::builtin::cloudinit::setup")
|
||||
end
|
||||
|
||||
def call(env)
|
||||
machine = env[:machine]
|
||||
|
||||
user_data_configs = machine.config.vm.cloud_init_configs
|
||||
.select { |c| c.type == :user_data }
|
||||
|
||||
if !user_data_configs.empty?
|
||||
user_data = setup_user_data(machine, env, user_data_configs)
|
||||
meta_data = { "instance-id" => "i-#{machine.id.split('-').join}" }
|
||||
|
||||
write_cfg_iso(machine, env, user_data, meta_data)
|
||||
end
|
||||
|
||||
# Continue On
|
||||
@app.call(env)
|
||||
end
|
||||
|
||||
# @param [Vagrant::Machine] machine
|
||||
# @param [Vagrant::Environment] env
|
||||
# @param [Array<#VagrantPlugins::Kernel_V2::VagrantConfigCloudInit>] user_data_cfgs
|
||||
# @return [Vagrant::Util::Mime::MultiPart] user_data
|
||||
def setup_user_data(machine, env, user_data_cfgs)
|
||||
machine.ui.info(I18n.t("vagrant.actions.vm.cloud_init_user_data_setup"))
|
||||
|
||||
text_cfgs = user_data_cfgs.map { |cfg| read_text_cfg(machine, cfg) }
|
||||
|
||||
user_data = generate_cfg_msg(machine, text_cfgs)
|
||||
user_data
|
||||
end
|
||||
|
||||
# Reads an individual cloud_init config and stores its contents and the
|
||||
# content_type as a MIME text
|
||||
#
|
||||
# @param [Vagrant::Machine] machine
|
||||
# @param [VagrantPlugins::Kernel_V2::VagrantConfigCloudInit] cfg
|
||||
# @return [Vagrant::Util::Mime::Entity] text_msg
|
||||
def read_text_cfg(machine, cfg)
|
||||
if cfg.path
|
||||
text = File.read(Pathname.new(cfg.path).expand_path(machine.env.root_path))
|
||||
else
|
||||
text = cfg.inline
|
||||
end
|
||||
|
||||
text_msg = Vagrant::Util::Mime::Entity.new(text, cfg.content_type)
|
||||
text_msg.disposition = "attachment; filename=\"#{File.basename(cfg.content_disposition_filename).gsub('"', '\"')}\"" if cfg.content_disposition_filename
|
||||
text_msg
|
||||
end
|
||||
|
||||
# Combines all known cloud_init configs into a multipart mixed MIME text
|
||||
# message
|
||||
#
|
||||
# @param [Vagrant::Machine] machine
|
||||
# @param [Array<Vagrant::Util::Mime::Entity>] text_msg - One or more text configs
|
||||
# @return [Vagrant::Util::Mime::Multipart] msg
|
||||
def generate_cfg_msg(machine, text_cfgs)
|
||||
msg = Vagrant::Util::Mime::Multipart.new
|
||||
msg.headers["MIME-Version"] = "1.0"
|
||||
|
||||
text_cfgs.each do |c|
|
||||
msg.add(c)
|
||||
end
|
||||
|
||||
msg
|
||||
end
|
||||
|
||||
# Writes the contents of the guests cloud_init config to a tmp
|
||||
# dir and passes that source directory along to the host cap to be
|
||||
# written to an iso
|
||||
#
|
||||
# @param [Vagrant::Machine] machine
|
||||
# @param [Vagrant::Util::Mime::Multipart] user_data
|
||||
# @param [Hash] meta_data
|
||||
def write_cfg_iso(machine, env, user_data, meta_data)
|
||||
iso_path = nil
|
||||
|
||||
if env[:env].host.capability?(:create_iso)
|
||||
begin
|
||||
source_dir = Pathname.new(Dir.mktmpdir(TEMP_PREFIX))
|
||||
File.open("#{source_dir}/user-data", 'w') { |file| file.write(user_data.to_s) }
|
||||
|
||||
File.open("#{source_dir}/meta-data", 'w') { |file| file.write(meta_data.to_yaml) }
|
||||
|
||||
iso_path = env[:env].host.capability(:create_iso,
|
||||
source_dir, volume_id: "cidata")
|
||||
attach_disk_config(machine, env, iso_path.to_path)
|
||||
ensure
|
||||
FileUtils.remove_entry(source_dir)
|
||||
end
|
||||
else
|
||||
raise Errors::CreateIsoHostCapNotFound
|
||||
end
|
||||
end
|
||||
|
||||
# Adds a new :dvd disk config with the given iso_path to be attached
|
||||
# to the guest later
|
||||
#
|
||||
# @param [Vagrant::Machine] machine
|
||||
# @param [Vagrant::Environment] env
|
||||
# @param [String] iso_path
|
||||
def attach_disk_config(machine, env, iso_path)
|
||||
@logger.info("Adding cloud_init iso '#{iso_path}' to disk config")
|
||||
machine.config.vm.disk :dvd, file: iso_path, name: "vagrant-cloud_init-disk"
|
||||
machine.config.vm.disks.each { |d| d.finalize! if d.type == :dvd && d.file == iso_path }
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
require 'vagrant/util/mime'
|
||||
require 'tmpdir'
|
||||
|
||||
module Vagrant
|
||||
module Action
|
||||
module Builtin
|
||||
class CloudInitSetup
|
||||
TEMP_PREFIX = "vagrant-cloud-init-iso-temp-".freeze
|
||||
|
||||
def initialize(app, env)
|
||||
@app = app
|
||||
@logger = Log4r::Logger.new("vagrant::action::builtin::cloudinit::setup")
|
||||
end
|
||||
|
||||
def call(env)
|
||||
machine = env[:machine]
|
||||
|
||||
user_data_configs = machine.config.vm.cloud_init_configs
|
||||
.select { |c| c.type == :user_data }
|
||||
|
||||
if !user_data_configs.empty?
|
||||
user_data = setup_user_data(machine, env, user_data_configs)
|
||||
meta_data = { "instance-id" => "i-#{machine.id.split('-').join}" }
|
||||
|
||||
write_cfg_iso(machine, env, user_data, meta_data)
|
||||
end
|
||||
|
||||
# Continue On
|
||||
@app.call(env)
|
||||
end
|
||||
|
||||
# @param [Vagrant::Machine] machine
|
||||
# @param [Vagrant::Environment] env
|
||||
# @param [Array<#VagrantPlugins::Kernel_V2::VagrantConfigCloudInit>] user_data_cfgs
|
||||
# @return [Vagrant::Util::Mime::MultiPart] user_data
|
||||
def setup_user_data(machine, env, user_data_cfgs)
|
||||
machine.ui.info(I18n.t("vagrant.actions.vm.cloud_init_user_data_setup"))
|
||||
|
||||
text_cfgs = user_data_cfgs.map { |cfg| read_text_cfg(machine, cfg) }
|
||||
|
||||
user_data = generate_cfg_msg(machine, text_cfgs)
|
||||
user_data
|
||||
end
|
||||
|
||||
# Reads an individual cloud_init config and stores its contents and the
|
||||
# content_type as a MIME text
|
||||
#
|
||||
# @param [Vagrant::Machine] machine
|
||||
# @param [VagrantPlugins::Kernel_V2::VagrantConfigCloudInit] cfg
|
||||
# @return [Vagrant::Util::Mime::Entity] text_msg
|
||||
def read_text_cfg(machine, cfg)
|
||||
if cfg.path
|
||||
text = File.read(Pathname.new(cfg.path).expand_path(machine.env.root_path))
|
||||
else
|
||||
text = cfg.inline
|
||||
end
|
||||
|
||||
text_msg = Vagrant::Util::Mime::Entity.new(text, cfg.content_type)
|
||||
text_msg.disposition = "attachment; filename=\"#{File.basename(cfg.content_disposition_filename).gsub('"', '\"')}\"" if cfg.content_disposition_filename
|
||||
text_msg
|
||||
end
|
||||
|
||||
# Combines all known cloud_init configs into a multipart mixed MIME text
|
||||
# message
|
||||
#
|
||||
# @param [Vagrant::Machine] machine
|
||||
# @param [Array<Vagrant::Util::Mime::Entity>] text_msg - One or more text configs
|
||||
# @return [Vagrant::Util::Mime::Multipart] msg
|
||||
def generate_cfg_msg(machine, text_cfgs)
|
||||
msg = Vagrant::Util::Mime::Multipart.new
|
||||
msg.headers["MIME-Version"] = "1.0"
|
||||
|
||||
text_cfgs.each do |c|
|
||||
msg.add(c)
|
||||
end
|
||||
|
||||
msg
|
||||
end
|
||||
|
||||
# Writes the contents of the guests cloud_init config to a tmp
|
||||
# dir and passes that source directory along to the host cap to be
|
||||
# written to an iso
|
||||
#
|
||||
# @param [Vagrant::Machine] machine
|
||||
# @param [Vagrant::Util::Mime::Multipart] user_data
|
||||
# @param [Hash] meta_data
|
||||
def write_cfg_iso(machine, env, user_data, meta_data)
|
||||
iso_path = nil
|
||||
|
||||
if env[:env].host.capability?(:create_iso)
|
||||
begin
|
||||
source_dir = Pathname.new(Dir.mktmpdir(TEMP_PREFIX))
|
||||
File.open("#{source_dir}/user-data", 'w') { |file| file.write(user_data.to_s) }
|
||||
|
||||
File.open("#{source_dir}/meta-data", 'w') { |file| file.write(meta_data.to_yaml) }
|
||||
|
||||
iso_path = env[:env].host.capability(:create_iso,
|
||||
source_dir, volume_id: "cidata")
|
||||
attach_disk_config(machine, env, iso_path.to_path)
|
||||
ensure
|
||||
FileUtils.remove_entry(source_dir)
|
||||
end
|
||||
else
|
||||
raise Errors::CreateIsoHostCapNotFound
|
||||
end
|
||||
end
|
||||
|
||||
# Adds a new :dvd disk config with the given iso_path to be attached
|
||||
# to the guest later
|
||||
#
|
||||
# @param [Vagrant::Machine] machine
|
||||
# @param [Vagrant::Environment] env
|
||||
# @param [String] iso_path
|
||||
def attach_disk_config(machine, env, iso_path)
|
||||
@logger.info("Adding cloud_init iso '#{iso_path}' to disk config")
|
||||
machine.config.vm.disk :dvd, file: iso_path, name: "vagrant-cloud_init-disk"
|
||||
machine.config.vm.disks.each { |d| d.finalize! if d.type == :dvd && d.file == iso_path }
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "log4r"
|
||||
require "log4r"
|
||||
|
||||
module Vagrant
|
||||
module Action
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "vagrant/util/template_renderer"
|
||||
require "vagrant/util/template_renderer"
|
||||
|
||||
module Vagrant
|
||||
module Action
|
||||
|
|
|
|||
|
|
@ -1,55 +1,55 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "json"
|
||||
|
||||
module Vagrant
|
||||
module Action
|
||||
module Builtin
|
||||
class Disk
|
||||
def initialize(app, env)
|
||||
@app = app
|
||||
@logger = Log4r::Logger.new("vagrant::action::builtin::disk")
|
||||
end
|
||||
|
||||
def call(env)
|
||||
machine = env[:machine]
|
||||
defined_disks = get_disks(machine, env)
|
||||
|
||||
# Call into providers machine implementation for disk management
|
||||
configured_disks = {}
|
||||
if !defined_disks.empty?
|
||||
if machine.provider.capability?(:configure_disks)
|
||||
configured_disks = machine.provider.capability(:configure_disks, defined_disks)
|
||||
else
|
||||
env[:ui].warn(I18n.t("vagrant.actions.disk.provider_unsupported",
|
||||
provider: machine.provider_name))
|
||||
end
|
||||
end
|
||||
|
||||
write_disk_metadata(machine, configured_disks) unless configured_disks.empty?
|
||||
|
||||
# Continue On
|
||||
@app.call(env)
|
||||
end
|
||||
|
||||
def write_disk_metadata(machine, current_disks)
|
||||
meta_file = machine.data_dir.join("disk_meta")
|
||||
@logger.debug("Writing disk metadata file to #{meta_file}")
|
||||
File.open(meta_file.to_s, "w+") do |file|
|
||||
file.write(JSON.dump(current_disks))
|
||||
end
|
||||
end
|
||||
|
||||
def get_disks(machine, env)
|
||||
return @_disks if @_disks
|
||||
|
||||
@_disks = []
|
||||
@_disks = machine.config.vm.disks
|
||||
|
||||
@_disks
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
require "json"
|
||||
|
||||
module Vagrant
|
||||
module Action
|
||||
module Builtin
|
||||
class Disk
|
||||
def initialize(app, env)
|
||||
@app = app
|
||||
@logger = Log4r::Logger.new("vagrant::action::builtin::disk")
|
||||
end
|
||||
|
||||
def call(env)
|
||||
machine = env[:machine]
|
||||
defined_disks = get_disks(machine, env)
|
||||
|
||||
# Call into providers machine implementation for disk management
|
||||
configured_disks = {}
|
||||
if !defined_disks.empty?
|
||||
if machine.provider.capability?(:configure_disks)
|
||||
configured_disks = machine.provider.capability(:configure_disks, defined_disks)
|
||||
else
|
||||
env[:ui].warn(I18n.t("vagrant.actions.disk.provider_unsupported",
|
||||
provider: machine.provider_name))
|
||||
end
|
||||
end
|
||||
|
||||
write_disk_metadata(machine, configured_disks) unless configured_disks.empty?
|
||||
|
||||
# Continue On
|
||||
@app.call(env)
|
||||
end
|
||||
|
||||
def write_disk_metadata(machine, current_disks)
|
||||
meta_file = machine.data_dir.join("disk_meta")
|
||||
@logger.debug("Writing disk metadata file to #{meta_file}")
|
||||
File.open(meta_file.to_s, "w+") do |file|
|
||||
file.write(JSON.dump(current_disks))
|
||||
end
|
||||
end
|
||||
|
||||
def get_disks(machine, env)
|
||||
return @_disks if @_disks
|
||||
|
||||
@_disks = []
|
||||
@_disks = machine.config.vm.disks
|
||||
|
||||
@_disks
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "log4r"
|
||||
Vagrant.require "timeout"
|
||||
require "log4r"
|
||||
require "timeout"
|
||||
|
||||
module Vagrant
|
||||
module Action
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "thread"
|
||||
Vagrant.require "log4r"
|
||||
require "thread"
|
||||
require "log4r"
|
||||
|
||||
module Vagrant
|
||||
module Action
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "set"
|
||||
Vagrant.require "log4r"
|
||||
Vagrant.require "socket"
|
||||
require "set"
|
||||
require "log4r"
|
||||
require "socket"
|
||||
|
||||
Vagrant.require "vagrant/util/is_port_open"
|
||||
Vagrant.require "vagrant/util/ipv4_interfaces"
|
||||
require "vagrant/util/is_port_open"
|
||||
require "vagrant/util/ipv4_interfaces"
|
||||
|
||||
module Vagrant
|
||||
module Action
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "log4r"
|
||||
require "log4r"
|
||||
|
||||
module Vagrant
|
||||
module Action
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "json"
|
||||
Vagrant.require "set"
|
||||
Vagrant.require 'vagrant/util/scoped_hash_override'
|
||||
require "json"
|
||||
require "set"
|
||||
require 'vagrant/util/scoped_hash_override'
|
||||
|
||||
module Vagrant
|
||||
module Action
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "log4r"
|
||||
require "log4r"
|
||||
|
||||
module Vagrant
|
||||
module Action
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "log4r"
|
||||
require "log4r"
|
||||
|
||||
require_relative "mixin_provisioners"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "log4r"
|
||||
require "log4r"
|
||||
|
||||
require_relative "mixin_provisioners"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "log4r"
|
||||
require "log4r"
|
||||
|
||||
module Vagrant
|
||||
module Action
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "pathname"
|
||||
require "pathname"
|
||||
|
||||
Vagrant.require "vagrant/util/ssh"
|
||||
require "vagrant/util/ssh"
|
||||
|
||||
module Vagrant
|
||||
module Action
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "log4r"
|
||||
require "log4r"
|
||||
|
||||
Vagrant.require "vagrant/util/platform"
|
||||
Vagrant.require "vagrant/util/ssh"
|
||||
Vagrant.require "vagrant/util/shell_quote"
|
||||
require "vagrant/util/platform"
|
||||
require "vagrant/util/ssh"
|
||||
require "vagrant/util/shell_quote"
|
||||
|
||||
module Vagrant
|
||||
module Action
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "log4r"
|
||||
require "log4r"
|
||||
|
||||
require_relative "mixin_synced_folders"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "log4r"
|
||||
require "log4r"
|
||||
|
||||
Vagrant.require 'vagrant/util/platform'
|
||||
require 'vagrant/util/platform'
|
||||
|
||||
require_relative "mixin_synced_folders"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require 'fileutils'
|
||||
Vagrant.require "pathname"
|
||||
Vagrant.require 'vagrant/util/safe_chdir'
|
||||
Vagrant.require 'vagrant/util/subprocess'
|
||||
Vagrant.require 'vagrant/util/presence'
|
||||
require 'fileutils'
|
||||
require "pathname"
|
||||
require 'vagrant/util/safe_chdir'
|
||||
require 'vagrant/util/subprocess'
|
||||
require 'vagrant/util/presence'
|
||||
|
||||
module Vagrant
|
||||
module Action
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "fileutils"
|
||||
require "fileutils"
|
||||
require_relative "package"
|
||||
|
||||
module Vagrant
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require 'log4r'
|
||||
require 'log4r'
|
||||
|
||||
Vagrant.require 'vagrant/action/hook'
|
||||
Vagrant.require 'vagrant/util/busy'
|
||||
Vagrant.require 'vagrant/util/experimental'
|
||||
require 'vagrant/action/hook'
|
||||
require 'vagrant/util/busy'
|
||||
require 'vagrant/util/experimental'
|
||||
|
||||
module Vagrant
|
||||
module Action
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "log4r"
|
||||
Vagrant.require 'vagrant/util/experimental'
|
||||
require "log4r"
|
||||
require 'vagrant/util/experimental'
|
||||
|
||||
module Vagrant
|
||||
module Action
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "vagrant/registry"
|
||||
require "vagrant/registry"
|
||||
|
||||
module Vagrant
|
||||
# This class imports and processes CLI aliases stored in ~/.vagrant.d/aliases
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require 'thread'
|
||||
Vagrant.require "log4r"
|
||||
require 'thread'
|
||||
require "log4r"
|
||||
|
||||
module Vagrant
|
||||
# This class executes multiple actions as a single batch, parallelizing
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require 'fileutils'
|
||||
Vagrant.require "tempfile"
|
||||
require 'fileutils'
|
||||
require "tempfile"
|
||||
|
||||
Vagrant.require "json"
|
||||
Vagrant.require "log4r"
|
||||
require "json"
|
||||
require "log4r"
|
||||
|
||||
Vagrant.require "vagrant/box_metadata"
|
||||
Vagrant.require "vagrant/util/downloader"
|
||||
Vagrant.require "vagrant/util/platform"
|
||||
Vagrant.require "vagrant/util/safe_chdir"
|
||||
Vagrant.require "vagrant/util/subprocess"
|
||||
require "vagrant/box_metadata"
|
||||
require "vagrant/util/downloader"
|
||||
require "vagrant/util/platform"
|
||||
require "vagrant/util/safe_chdir"
|
||||
require "vagrant/util/subprocess"
|
||||
|
||||
module Vagrant
|
||||
# Represents a "box," which is a package Vagrant environment that is used
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "digest/sha1"
|
||||
Vagrant.require "fileutils"
|
||||
Vagrant.require "monitor"
|
||||
Vagrant.require "tmpdir"
|
||||
Vagrant.require "log4r"
|
||||
Vagrant.require "vagrant/util/platform"
|
||||
Vagrant.require "vagrant/util/subprocess"
|
||||
require "digest/sha1"
|
||||
require "fileutils"
|
||||
require "monitor"
|
||||
require "tmpdir"
|
||||
require "log4r"
|
||||
require "vagrant/util/platform"
|
||||
require "vagrant/util/subprocess"
|
||||
|
||||
module Vagrant
|
||||
# Represents a collection a boxes found on disk. This provides methods
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "json"
|
||||
require "json"
|
||||
|
||||
module Vagrant
|
||||
# BoxMetadata represents metadata about a box, including the name
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "monitor"
|
||||
Vagrant.require "pathname"
|
||||
Vagrant.require "set"
|
||||
Vagrant.require "tempfile"
|
||||
Vagrant.require "fileutils"
|
||||
Vagrant.require "uri"
|
||||
require "monitor"
|
||||
require "pathname"
|
||||
require "set"
|
||||
require "tempfile"
|
||||
require "fileutils"
|
||||
require "uri"
|
||||
|
||||
Vagrant.require "rubygems/package"
|
||||
Vagrant.require "rubygems/uninstaller"
|
||||
Vagrant.require "rubygems/name_tuple"
|
||||
require "rubygems/package"
|
||||
require "rubygems/uninstaller"
|
||||
require "rubygems/name_tuple"
|
||||
|
||||
require_relative "shared_helpers"
|
||||
require_relative "version"
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require 'log4r'
|
||||
Vagrant.require 'optparse'
|
||||
require 'log4r'
|
||||
require 'optparse'
|
||||
|
||||
Vagrant.require 'vagrant/util/experimental'
|
||||
require 'vagrant/util/experimental'
|
||||
|
||||
module Vagrant
|
||||
# Manages the command line interface to Vagrant.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "vagrant/registry"
|
||||
require "vagrant/registry"
|
||||
|
||||
module Vagrant
|
||||
module Config
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "vagrant/config/v1/root"
|
||||
require "vagrant/config/v1/root"
|
||||
|
||||
module Vagrant
|
||||
module Config
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "set"
|
||||
require "set"
|
||||
|
||||
module Vagrant
|
||||
module Config
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "vagrant/config/v2/root"
|
||||
require "vagrant/config/v2/root"
|
||||
|
||||
module Vagrant
|
||||
module Config
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "set"
|
||||
require "set"
|
||||
|
||||
Vagrant.require "vagrant/config/v2/util"
|
||||
require "vagrant/config/v2/util"
|
||||
|
||||
module Vagrant
|
||||
module Config
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require 'fileutils'
|
||||
Vagrant.require 'json'
|
||||
Vagrant.require 'pathname'
|
||||
Vagrant.require 'set'
|
||||
Vagrant.require 'thread'
|
||||
require 'fileutils'
|
||||
require 'json'
|
||||
require 'pathname'
|
||||
require 'set'
|
||||
require 'thread'
|
||||
|
||||
Vagrant.require 'log4r'
|
||||
require 'log4r'
|
||||
|
||||
Vagrant.require 'vagrant/util/file_mode'
|
||||
Vagrant.require 'vagrant/util/platform'
|
||||
Vagrant.require 'vagrant/util/hash_with_indifferent_access'
|
||||
Vagrant.require "vagrant/util/silence_warnings"
|
||||
Vagrant.require "vagrant/vagrantfile"
|
||||
Vagrant.require "vagrant/version"
|
||||
require 'vagrant/util/file_mode'
|
||||
require 'vagrant/util/platform'
|
||||
require 'vagrant/util/hash_with_indifferent_access'
|
||||
require "vagrant/util/silence_warnings"
|
||||
require "vagrant/vagrantfile"
|
||||
require "vagrant/version"
|
||||
|
||||
module Vagrant
|
||||
# A "Vagrant environment" represents a configuration of how Vagrant
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "log4r"
|
||||
Vagrant.require "vagrant/capability_host"
|
||||
require "log4r"
|
||||
require "vagrant/capability_host"
|
||||
|
||||
module Vagrant
|
||||
# This class handles guest-OS specific interactions with a machine.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "vagrant/capability_host"
|
||||
require "vagrant/capability_host"
|
||||
|
||||
module Vagrant
|
||||
# This class handles host-OS specific interactions. It is responsible for
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
require_relative "./util/ssh"
|
||||
require_relative "./action/builtin/mixin_synced_folders"
|
||||
|
||||
Vagrant.require "digest/md5"
|
||||
Vagrant.require "thread"
|
||||
Vagrant.require "log4r"
|
||||
require "digest/md5"
|
||||
require "thread"
|
||||
require "log4r"
|
||||
|
||||
module Vagrant
|
||||
# This represents a machine that Vagrant manages. This provides a singular
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "json"
|
||||
Vagrant.require "pathname"
|
||||
Vagrant.require "securerandom"
|
||||
Vagrant.require "thread"
|
||||
require "json"
|
||||
require "pathname"
|
||||
require "securerandom"
|
||||
require "thread"
|
||||
|
||||
Vagrant.require "vagrant/util/silence_warnings"
|
||||
require "vagrant/util/silence_warnings"
|
||||
|
||||
module Vagrant
|
||||
# MachineIndex is able to manage the index of created Vagrant environments
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "fake_ftp"
|
||||
require "fake_ftp"
|
||||
|
||||
module FakeFtp
|
||||
class File
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
# information should be included in the output, we
|
||||
# make some modifications to allow the trace check to
|
||||
# still work while also supporting trace as a valid level
|
||||
Vagrant.require "log4r/loggerfactory"
|
||||
require "log4r/loggerfactory"
|
||||
|
||||
if !Log4r::Logger::LoggerFactory.respond_to?(:fake_define_methods)
|
||||
class Log4r::Logger::LoggerFactory
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "net/ssh"
|
||||
Vagrant.require "net/ssh/buffer"
|
||||
require "net/ssh"
|
||||
require "net/ssh/buffer"
|
||||
|
||||
# Set the version requirement for when net-ssh should be patched
|
||||
NET_SSH_PATCH_REQUIREMENT = Gem::Requirement.new(">= 7.0.0", "<= 7.3")
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "pathname"
|
||||
Vagrant.require "set"
|
||||
require "pathname"
|
||||
require "set"
|
||||
|
||||
require_relative "../bundler"
|
||||
require_relative "../shared_helpers"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "json"
|
||||
Vagrant.require "fileutils"
|
||||
Vagrant.require "tempfile"
|
||||
require "json"
|
||||
require "fileutils"
|
||||
require "tempfile"
|
||||
|
||||
module Vagrant
|
||||
module Plugin
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "log4r"
|
||||
Vagrant.require "vagrant/plugin/v1/errors"
|
||||
require "log4r"
|
||||
require "vagrant/plugin/v1/errors"
|
||||
|
||||
module Vagrant
|
||||
module Plugin
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require 'log4r'
|
||||
Vagrant.require "vagrant/util/safe_puts"
|
||||
require 'log4r'
|
||||
require "vagrant/util/safe_puts"
|
||||
|
||||
module Vagrant
|
||||
module Plugin
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "log4r"
|
||||
require "log4r"
|
||||
|
||||
module Vagrant
|
||||
module Plugin
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "set"
|
||||
Vagrant.require "log4r"
|
||||
require "set"
|
||||
require "log4r"
|
||||
|
||||
module Vagrant
|
||||
module Plugin
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "log4r"
|
||||
require "log4r"
|
||||
|
||||
# We don't autoload components because if we're loading anything in the
|
||||
# V2 namespace anyways, then we're going to need the Components class.
|
||||
Vagrant.require "vagrant/plugin/v2/components"
|
||||
Vagrant.require "vagrant/plugin/v2/errors"
|
||||
require "vagrant/plugin/v2/components"
|
||||
require "vagrant/plugin/v2/errors"
|
||||
|
||||
module Vagrant
|
||||
module Plugin
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require 'log4r'
|
||||
Vagrant.require "vagrant/util/safe_puts"
|
||||
require 'log4r'
|
||||
require "vagrant/util/safe_puts"
|
||||
|
||||
module Vagrant
|
||||
module Plugin
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "timeout"
|
||||
require "timeout"
|
||||
|
||||
module Vagrant
|
||||
module Plugin
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "set"
|
||||
require "set"
|
||||
|
||||
module Vagrant
|
||||
module Plugin
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "log4r"
|
||||
require "log4r"
|
||||
|
||||
module Vagrant
|
||||
module Plugin
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "set"
|
||||
Vagrant.require "log4r"
|
||||
Vagrant.require "vagrant/plugin/v2/components"
|
||||
require "set"
|
||||
require "log4r"
|
||||
require "vagrant/plugin/v2/components"
|
||||
|
||||
module Vagrant
|
||||
module Plugin
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "vagrant/capability_host"
|
||||
require "vagrant/capability_host"
|
||||
|
||||
module Vagrant
|
||||
module Plugin
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require 'fileutils'
|
||||
Vagrant.require 'log4r'
|
||||
Vagrant.require 'shellwords'
|
||||
require 'fileutils'
|
||||
require 'log4r'
|
||||
require 'shellwords'
|
||||
|
||||
Vagrant.require Vagrant.source_root.join("plugins/provisioners/shell/provisioner")
|
||||
Vagrant.require "vagrant/util/subprocess"
|
||||
Vagrant.require "vagrant/util/platform"
|
||||
Vagrant.require "vagrant/util/powershell"
|
||||
require Vagrant.source_root.join("plugins/provisioners/shell/provisioner")
|
||||
require "vagrant/util/subprocess"
|
||||
require "vagrant/util/platform"
|
||||
require "vagrant/util/powershell"
|
||||
|
||||
module Vagrant
|
||||
module Plugin
|
||||
|
|
|
|||
|
|
@ -21,6 +21,10 @@ module Vagrant
|
|||
# @note This is not the maximum time for a thread to complete.
|
||||
THREAD_MAX_JOIN_TIMEOUT = 60
|
||||
|
||||
# List of required external tools that are expected to be
|
||||
# present when running outside of the installers
|
||||
REQUIRED_EXTERNAL_TOOLS = ["bsdtar", "curl", "ssh"].map(&:freeze).freeze
|
||||
|
||||
# This holds a global lock for the duration of the block. This should
|
||||
# be invoked around anything that is modifying process state (such as
|
||||
# environmental variables).
|
||||
|
|
@ -168,7 +172,7 @@ module Vagrant
|
|||
if ENV["VAGRANT_ENABLE_RESOLV_REPLACE"]
|
||||
if !ENV["VAGRANT_DISABLE_RESOLV_REPLACE"]
|
||||
begin
|
||||
Vagrant.require "resolv-replace"
|
||||
require "resolv-replace"
|
||||
true
|
||||
rescue
|
||||
false
|
||||
|
|
@ -192,7 +196,7 @@ module Vagrant
|
|||
# @return [Logger]
|
||||
def self.global_logger
|
||||
if @_global_logger.nil?
|
||||
Vagrant.require "log4r"
|
||||
require "log4r"
|
||||
@_global_logger = Log4r::Logger.new("vagrant::global")
|
||||
end
|
||||
@_global_logger
|
||||
|
|
@ -226,65 +230,9 @@ module Vagrant
|
|||
@_default_cli_options.dup
|
||||
end
|
||||
|
||||
# Loads the provided path. If the base of the path
|
||||
# is a Vagrant runtime dependency, the gem will be
|
||||
# activated with the proper constraint first.
|
||||
#
|
||||
# NOTE: This is currently disabled by default and
|
||||
# will transition to enabled by default as more
|
||||
# non-installer based environments are tested.
|
||||
#
|
||||
# @return [nil]
|
||||
def self.require(path)
|
||||
catch(:activation_complete) do
|
||||
# If activation is not enabled, don't attempt activation
|
||||
throw :activation_complete if ENV["VAGRANT_ENABLE_GEM_ACTIVATION"].nil?
|
||||
|
||||
# If it's a vagrant path, don't do anything.
|
||||
throw :activation_complete if path.to_s.start_with?("vagrant/")
|
||||
|
||||
# Attempt to fetch the vagrant specification
|
||||
if @_vagrant_spec.nil?
|
||||
@_vagrant_activated_dependencies = {}
|
||||
begin
|
||||
@_vagrant_spec = Gem::Specification.find_by_name("vagrant")
|
||||
rescue Gem::MissingSpecError
|
||||
# If it couldn't be found, print a warning to stderr and bail
|
||||
if !@_spec_load_failure_warning
|
||||
$stderr.puts "WARN: Failed to locate vagrant specification for dependency loading"
|
||||
@_spec_load_failure_warning = true
|
||||
end
|
||||
|
||||
throw :activation_complete
|
||||
end
|
||||
end
|
||||
|
||||
# Attempt to get the name of the gem by the given path
|
||||
dep_name = Gem::Specification.find_by_path(path)&.name
|
||||
|
||||
# Bail if a dependency name cannot be determined
|
||||
throw :activation_complete if dep_name.nil?
|
||||
|
||||
# Bail if already activated
|
||||
throw :activation_complete if @_vagrant_activated_dependencies[dep_name]
|
||||
|
||||
# Extract the dependency from the runtime dependency list
|
||||
dependency = @_vagrant_spec.runtime_dependencies.detect do |d|
|
||||
d.name == dep_name
|
||||
end
|
||||
|
||||
# If the dependency isn't found, bail
|
||||
throw :activation_complete if dependency.nil?
|
||||
|
||||
# Activate the gem
|
||||
gem(dependency.name, dependency.requirement.as_list)
|
||||
|
||||
@_vagrant_activated_dependencies[dependency.name] = true
|
||||
def self.detect_missing_tools
|
||||
REQUIRED_EXTERNAL_TOOLS.find_all do |tool|
|
||||
!Vagrant::Util::Which.which(tool)
|
||||
end
|
||||
|
||||
# Finally, require the provided path.
|
||||
::Kernel.require(path)
|
||||
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "delegate"
|
||||
Vagrant.require "io/console"
|
||||
Vagrant.require "thread"
|
||||
Vagrant.require "log4r"
|
||||
Vagrant.require "vagrant/util/platform"
|
||||
Vagrant.require "vagrant/util/safe_puts"
|
||||
require "delegate"
|
||||
require "io/console"
|
||||
require "thread"
|
||||
require "log4r"
|
||||
require "vagrant/util/platform"
|
||||
require "vagrant/util/safe_puts"
|
||||
|
||||
module Vagrant
|
||||
module UI
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "tempfile"
|
||||
Vagrant.require "fileutils"
|
||||
Vagrant.require "pathname"
|
||||
Vagrant.require "vagrant/util/directory"
|
||||
Vagrant.require "vagrant/util/subprocess"
|
||||
require "tempfile"
|
||||
require "fileutils"
|
||||
require "pathname"
|
||||
require "vagrant/util/directory"
|
||||
require "vagrant/util/subprocess"
|
||||
|
||||
module Vagrant
|
||||
module Util
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "log4r"
|
||||
Vagrant.require "singleton"
|
||||
require "log4r"
|
||||
require "singleton"
|
||||
|
||||
module Vagrant
|
||||
module Util
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require 'thread'
|
||||
require 'thread'
|
||||
|
||||
module Vagrant
|
||||
module Util
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require 'pathname'
|
||||
require 'pathname'
|
||||
|
||||
module Vagrant
|
||||
module Util
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "cgi"
|
||||
Vagrant.require "uri"
|
||||
require "cgi"
|
||||
require "uri"
|
||||
|
||||
Vagrant.require "log4r"
|
||||
Vagrant.require "digest"
|
||||
Vagrant.require "digest/md5"
|
||||
Vagrant.require "digest/sha1"
|
||||
Vagrant.require "vagrant/util/busy"
|
||||
Vagrant.require "vagrant/util/platform"
|
||||
Vagrant.require "vagrant/util/subprocess"
|
||||
Vagrant.require "vagrant/util/curl_helper"
|
||||
Vagrant.require "vagrant/util/file_checksum"
|
||||
require "log4r"
|
||||
require "digest"
|
||||
require "digest/md5"
|
||||
require "digest/sha1"
|
||||
require "vagrant/util/busy"
|
||||
require "vagrant/util/platform"
|
||||
require "vagrant/util/subprocess"
|
||||
require "vagrant/util/curl_helper"
|
||||
require "vagrant/util/file_checksum"
|
||||
|
||||
module Vagrant
|
||||
module Util
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
# the moment, and this class isn't directly used. It is merely here for
|
||||
# documentation of structure of the class.
|
||||
|
||||
Vagrant.require "vagrant/errors"
|
||||
require "vagrant/errors"
|
||||
|
||||
class DigestClass
|
||||
def update(string); end
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "vagrant/util/platform"
|
||||
require "vagrant/util/platform"
|
||||
|
||||
module Vagrant
|
||||
module Util
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "socket"
|
||||
require "socket"
|
||||
|
||||
module Vagrant
|
||||
module Util
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "base64"
|
||||
Vagrant.require "ed25519"
|
||||
Vagrant.require "securerandom"
|
||||
require "base64"
|
||||
require "ed25519"
|
||||
require "securerandom"
|
||||
|
||||
Vagrant.require "vagrant/util/retryable"
|
||||
require "vagrant/util/retryable"
|
||||
|
||||
module Vagrant
|
||||
module Util
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "vagrant/util/credential_scrubber"
|
||||
Vagrant.require "log4r/formatter/formatter"
|
||||
require "vagrant/util/credential_scrubber"
|
||||
require "log4r/formatter/formatter"
|
||||
|
||||
module Vagrant
|
||||
module Util
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require 'mime/types'
|
||||
Vagrant.require 'securerandom'
|
||||
require 'mime/types'
|
||||
require 'securerandom'
|
||||
|
||||
module Vagrant
|
||||
module Util
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "ipaddr"
|
||||
require "ipaddr"
|
||||
|
||||
module Vagrant
|
||||
module Util
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "rbconfig"
|
||||
Vagrant.require "shellwords"
|
||||
Vagrant.require "tempfile"
|
||||
Vagrant.require "tmpdir"
|
||||
Vagrant.require "log4r"
|
||||
require "rbconfig"
|
||||
require "shellwords"
|
||||
require "tempfile"
|
||||
require "tmpdir"
|
||||
require "log4r"
|
||||
|
||||
Vagrant.require "vagrant/util/subprocess"
|
||||
Vagrant.require "vagrant/util/powershell"
|
||||
Vagrant.require "vagrant/util/which"
|
||||
require "vagrant/util/subprocess"
|
||||
require "vagrant/util/powershell"
|
||||
require "vagrant/util/which"
|
||||
|
||||
module Vagrant
|
||||
module Util
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "base64"
|
||||
Vagrant.require "tmpdir"
|
||||
require "base64"
|
||||
require "tmpdir"
|
||||
|
||||
require_relative "subprocess"
|
||||
require_relative "which"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "log4r"
|
||||
require "log4r"
|
||||
|
||||
module Vagrant
|
||||
module Util
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require 'thread'
|
||||
require 'thread'
|
||||
|
||||
module Vagrant
|
||||
module Util
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "log4r"
|
||||
require "log4r"
|
||||
|
||||
Vagrant.require 'childprocess'
|
||||
require 'childprocess'
|
||||
|
||||
Vagrant.require "vagrant/util/file_mode"
|
||||
Vagrant.require "vagrant/util/platform"
|
||||
Vagrant.require "vagrant/util/safe_exec"
|
||||
Vagrant.require "vagrant/util/safe_puts"
|
||||
Vagrant.require "vagrant/util/subprocess"
|
||||
Vagrant.require "vagrant/util/which"
|
||||
require "vagrant/util/file_mode"
|
||||
require "vagrant/util/platform"
|
||||
require "vagrant/util/safe_exec"
|
||||
require "vagrant/util/safe_puts"
|
||||
require "vagrant/util/subprocess"
|
||||
require "vagrant/util/which"
|
||||
|
||||
module Vagrant
|
||||
module Util
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require 'thread'
|
||||
require 'thread'
|
||||
|
||||
Vagrant.require 'childprocess'
|
||||
Vagrant.require 'log4r'
|
||||
require 'childprocess'
|
||||
require 'log4r'
|
||||
|
||||
Vagrant.require 'vagrant/util/io'
|
||||
Vagrant.require 'vagrant/util/platform'
|
||||
Vagrant.require 'vagrant/util/safe_chdir'
|
||||
Vagrant.require 'vagrant/util/which'
|
||||
require 'vagrant/util/io'
|
||||
require 'vagrant/util/platform'
|
||||
require 'vagrant/util/safe_chdir'
|
||||
require 'vagrant/util/which'
|
||||
|
||||
module Vagrant
|
||||
module Util
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require 'ostruct'
|
||||
Vagrant.require "pathname"
|
||||
require 'ostruct'
|
||||
require "pathname"
|
||||
|
||||
Vagrant.require 'erubi'
|
||||
require 'erubi'
|
||||
|
||||
module Vagrant
|
||||
module Util
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "uri"
|
||||
require "uri"
|
||||
|
||||
Vagrant.require "log4r"
|
||||
Vagrant.require "vagrant/util/busy"
|
||||
Vagrant.require "vagrant/util/platform"
|
||||
Vagrant.require "vagrant/util/subprocess"
|
||||
Vagrant.require "vagrant/util/curl_helper"
|
||||
require "log4r"
|
||||
require "vagrant/util/busy"
|
||||
require "vagrant/util/platform"
|
||||
require "vagrant/util/subprocess"
|
||||
require "vagrant/util/curl_helper"
|
||||
|
||||
module Vagrant
|
||||
module Util
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "vagrant/util/platform"
|
||||
require "vagrant/util/platform"
|
||||
|
||||
module Vagrant
|
||||
module Util
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "fiddle/import"
|
||||
require "fiddle/import"
|
||||
|
||||
module Vagrant
|
||||
module Util
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "vagrant/util/template_renderer"
|
||||
Vagrant.require "log4r"
|
||||
require "vagrant/util/template_renderer"
|
||||
require "log4r"
|
||||
|
||||
module Vagrant
|
||||
# This class provides a way to load and access the contents
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require 'optparse'
|
||||
require 'optparse'
|
||||
|
||||
require 'vagrant/util/install_cli_autocomplete'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "optparse"
|
||||
require "optparse"
|
||||
require 'vagrant/util/install_cli_autocomplete'
|
||||
|
||||
module VagrantPlugins
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require 'optparse'
|
||||
require 'optparse'
|
||||
|
||||
require_relative 'download_mixins'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require 'optparse'
|
||||
require 'optparse'
|
||||
|
||||
module VagrantPlugins
|
||||
module CommandBox
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require 'optparse'
|
||||
require 'optparse'
|
||||
|
||||
require_relative 'download_mixins'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require 'optparse'
|
||||
require 'optparse'
|
||||
|
||||
module VagrantPlugins
|
||||
module CommandBox
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require 'optparse'
|
||||
require 'optparse'
|
||||
|
||||
module VagrantPlugins
|
||||
module CommandBox
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require "fileutils"
|
||||
Vagrant.require 'optparse'
|
||||
Vagrant.require "pathname"
|
||||
require "fileutils"
|
||||
require 'optparse'
|
||||
require "pathname"
|
||||
|
||||
module VagrantPlugins
|
||||
module CommandBox
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require 'optparse'
|
||||
require 'optparse'
|
||||
|
||||
module VagrantPlugins
|
||||
module CommandBox
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require 'optparse'
|
||||
require 'optparse'
|
||||
|
||||
require_relative 'download_mixins'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require 'optparse'
|
||||
require 'optparse'
|
||||
|
||||
module VagrantPlugins
|
||||
module CommandCap
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
Vagrant.require 'optparse'
|
||||
require 'optparse'
|
||||
|
||||
module VagrantPlugins
|
||||
module CloudCommand
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue