vagrant-unbundled 2.1.4.0 → 2.2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +58 -1
- data/Gemfile.lock +9 -5
- data/contrib/bash/completion.sh +16 -2
- data/contrib/sudoers/osx +1 -1
- data/lib/vagrant/environment.rb +16 -21
- data/lib/vagrant/errors.rb +28 -0
- data/lib/vagrant/machine.rb +1 -1
- data/lib/vagrant/plugin/manager.rb +35 -1
- data/lib/vagrant/plugin/v2/trigger.rb +23 -0
- data/lib/vagrant/util/curl_helper.rb +96 -0
- data/lib/vagrant/util/downloader.rb +2 -79
- data/lib/vagrant/util/guest_inspection.rb +18 -5
- data/lib/vagrant/util/platform.rb +33 -8
- data/lib/vagrant/util/uploader.rb +103 -0
- data/lib/vagrant/vagrantfile.rb +5 -1
- data/lib/vagrant.rb +39 -13
- data/plugins/commands/cloud/auth/login.rb +90 -0
- data/plugins/commands/cloud/auth/logout.rb +42 -0
- data/plugins/commands/cloud/auth/plugin.rb +20 -0
- data/plugins/commands/cloud/auth/root.rb +73 -0
- data/plugins/commands/cloud/auth/whoami.rb +62 -0
- data/plugins/commands/cloud/box/create.rb +75 -0
- data/plugins/commands/cloud/box/delete.rb +65 -0
- data/plugins/commands/cloud/box/plugin.rb +19 -0
- data/plugins/commands/cloud/box/root.rb +77 -0
- data/plugins/commands/cloud/box/show.rb +74 -0
- data/plugins/commands/cloud/box/update.rb +71 -0
- data/plugins/commands/cloud/client/client.rb +264 -0
- data/plugins/commands/cloud/errors.rb +28 -0
- data/plugins/commands/cloud/list.rb +52 -0
- data/plugins/commands/cloud/locales/en.yml +159 -0
- data/plugins/commands/cloud/plugin.rb +30 -0
- data/plugins/commands/cloud/provider/create.rb +73 -0
- data/plugins/commands/cloud/provider/delete.rb +70 -0
- data/plugins/commands/cloud/provider/plugin.rb +19 -0
- data/plugins/commands/cloud/provider/root.rb +77 -0
- data/plugins/commands/cloud/provider/update.rb +73 -0
- data/plugins/commands/cloud/provider/upload.rb +75 -0
- data/plugins/commands/cloud/publish.rb +165 -0
- data/plugins/commands/cloud/root.rb +104 -0
- data/plugins/commands/cloud/search.rb +83 -0
- data/plugins/commands/cloud/util.rb +206 -0
- data/plugins/commands/cloud/version/create.rb +69 -0
- data/plugins/commands/cloud/version/delete.rb +68 -0
- data/plugins/commands/cloud/version/plugin.rb +19 -0
- data/plugins/commands/cloud/version/release.rb +69 -0
- data/plugins/commands/cloud/version/revoke.rb +69 -0
- data/plugins/commands/cloud/version/root.rb +81 -0
- data/plugins/commands/cloud/version/update.rb +69 -0
- data/plugins/commands/init/command.rb +1 -1
- data/plugins/commands/login/plugin.rb +4 -3
- data/plugins/commands/powershell/command.rb +3 -0
- data/plugins/commands/powershell/plugin.rb +1 -0
- data/plugins/commands/upload/command.rb +236 -0
- data/plugins/commands/upload/plugin.rb +17 -0
- data/plugins/commands/winrm/command.rb +69 -0
- data/plugins/commands/winrm/plugin.rb +17 -0
- data/plugins/commands/winrm_config/command.rb +125 -0
- data/plugins/commands/winrm_config/plugin.rb +17 -0
- data/plugins/guests/bsd/cap/file_system.rb +77 -0
- data/plugins/guests/bsd/plugin.rb +15 -0
- data/plugins/guests/linux/cap/file_system.rb +79 -0
- data/plugins/guests/linux/cap/network_interfaces.rb +13 -2
- data/plugins/guests/linux/plugin.rb +15 -0
- data/plugins/guests/redhat/cap/change_host_name.rb +21 -13
- data/plugins/guests/solaris/cap/file_system.rb +77 -0
- data/plugins/guests/solaris/plugin.rb +15 -0
- data/plugins/guests/windows/cap/file_system.rb +65 -0
- data/plugins/guests/windows/cap/mount_shared_folder.rb +1 -1
- data/plugins/guests/windows/plugin.rb +10 -0
- data/plugins/kernel_v2/config/vm.rb +3 -0
- data/plugins/kernel_v2/config/vm_trigger.rb +49 -1
- data/plugins/providers/docker/action/build.rb +23 -8
- data/plugins/providers/docker/action/is_build.rb +1 -1
- data/plugins/providers/docker/config.rb +50 -10
- data/plugins/providers/hyperv/scripts/configure_vm.ps1 +16 -2
- data/plugins/providers/virtualbox/action/match_mac_address.rb +8 -5
- data/plugins/providers/virtualbox/driver/version_5_0.rb +1 -0
- data/plugins/provisioners/ansible/provisioner/guest.rb +2 -8
- data/plugins/provisioners/puppet/provisioner/puppet.rb +4 -2
- data/plugins/provisioners/salt/bootstrap-salt.sh +1 -1
- data/plugins/provisioners/salt/provisioner.rb +19 -4
- data/plugins/synced_folders/rsync/helper.rb +2 -1
- data/templates/commands/ssh_config/config.erb +1 -1
- data/templates/commands/winrm_config/config.erb +11 -0
- data/templates/guests/openbsd/network_static6.erb +1 -0
- data/templates/locales/en.yml +60 -1
- data/templates/locales/providers_docker.yml +11 -3
- data/vagrant.gemspec +3 -1
- data/vendor/bundle/ruby/2.5.0/bundler/gems/vagrant-spec-94a9d31ba18b/vagrant-spec.gemspec +1 -1
- data/vendor/bundle/ruby/2.5.0/gems/vagrant_cloud-2.0.1/LICENSE +22 -0
- data/vendor/bundle/ruby/2.5.0/gems/vagrant_cloud-2.0.1/README.md +67 -0
- data/vendor/bundle/ruby/2.5.0/gems/vagrant_cloud-2.0.1/bin/vagrant_cloud +5 -0
- data/vendor/bundle/ruby/2.5.0/gems/vagrant_cloud-2.0.1/lib/vagrant_cloud/account.rb +190 -0
- data/vendor/bundle/ruby/2.5.0/gems/vagrant_cloud-2.0.1/lib/vagrant_cloud/box.rb +185 -0
- data/vendor/bundle/ruby/2.5.0/gems/vagrant_cloud-2.0.1/lib/vagrant_cloud/client.rb +73 -0
- data/vendor/bundle/ruby/2.5.0/gems/vagrant_cloud-2.0.1/lib/vagrant_cloud/errors.rb +25 -0
- data/vendor/bundle/ruby/2.5.0/gems/vagrant_cloud-2.0.1/lib/vagrant_cloud/provider.rb +149 -0
- data/vendor/bundle/ruby/2.5.0/gems/vagrant_cloud-2.0.1/lib/vagrant_cloud/search.rb +31 -0
- data/vendor/bundle/ruby/2.5.0/gems/vagrant_cloud-2.0.1/lib/vagrant_cloud/version.rb +188 -0
- data/vendor/bundle/ruby/2.5.0/gems/vagrant_cloud-2.0.1/lib/vagrant_cloud.rb +11 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/.gitignore +10 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/.rubocop.yml +38 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/.travis.yml +10 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/Gemfile +2 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/LICENSE +202 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/README.md +276 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/Rakefile +33 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/Vagrantfile +6 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/WinrmAppveyor.psm1 +32 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/appveyor.yml +50 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/bin/rwinrm +90 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/changelog.md +133 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/connection.rb +84 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/connection_opts.rb +90 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/exceptions.rb +88 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/http/response_handler.rb +127 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/http/transport.rb +462 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/http/transport_factory.rb +64 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/output.rb +58 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/create_pipeline.xml.erb +167 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/fragment.rb +68 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/init_runspace_pool.xml.erb +224 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/message.rb +128 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/message_data/base.rb +47 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/message_data/error_record.rb +66 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/message_data/pipeline_host_call.rb +30 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/message_data/pipeline_output.rb +48 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/message_data/pipeline_state.rb +38 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/message_data/runspacepool_host_call.rb +30 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/message_data/runspacepool_state.rb +37 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/message_data/session_capability.rb +34 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/message_data.rb +40 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/message_defragmenter.rb +62 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/message_factory.rb +74 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/message_fragmenter.rb +58 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/powershell_output_decoder.rb +142 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/receive_response_reader.rb +95 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/session_capability.xml.erb +7 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/uuid.rb +39 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/shells/base.rb +187 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/shells/cmd.rb +63 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/shells/power_shell.rb +207 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/shells/retryable.rb +44 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/shells/shell_factory.rb +56 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/version.rb +5 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/base.rb +57 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/cleanup_command.rb +60 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/close_shell.rb +49 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/command.rb +100 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/command_output.rb +75 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/command_output_decoder.rb +54 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/configuration.rb +44 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/create_pipeline.rb +64 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/create_shell.rb +115 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/header.rb +213 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/init_runspace_pool.rb +96 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/iso8601_duration.rb +58 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/keep_alive.rb +66 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/receive_response_reader.rb +128 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/send_data.rb +66 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/soap.rb +49 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/wql_pull.rb +54 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/wql_query.rb +98 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/write_stdin.rb +86 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm.rb +37 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/preamble +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/integration/auth_timeout_spec.rb +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/integration/cmd_spec.rb +130 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/integration/config-example.yml +16 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/integration/issue_59_spec.rb +25 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/integration/powershell_spec.rb +164 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/integration/spec_helper.rb +62 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/integration/transport_spec.rb +98 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/integration/wql_spec.rb +33 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/matchers.rb +59 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/configuration_spec.rb +183 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/connection_spec.rb +37 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/exception_spec.rb +49 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/http/transport_factory_spec.rb +66 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/http/transport_spec.rb +43 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/output_spec.rb +128 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/fragment_spec.rb +60 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/message_data/base_spec.rb +11 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/message_data/error_record_spec.rb +39 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/message_data/pipeline_host_call_spec.rb +23 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/message_data/pipeline_output_spec.rb +30 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/message_data/pipeline_state_spec.rb +38 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/message_data/runspace_pool_host_call_spec.rb +23 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/message_data/runspacepool_state_spec.rb +14 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/message_data/session_capability_spec.rb +28 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/message_data_spec.rb +33 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/message_defragmenter_spec.rb +45 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/message_fragmenter_spec.rb +103 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/powershell_output_decoder_spec.rb +98 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/psrp_message_spec.rb +73 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/recieve_response_reader_spec.rb +170 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/uuid_spec.rb +28 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/response_handler_spec.rb +69 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/shells/base_spec.rb +227 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/shells/cmd_spec.rb +75 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/shells/powershell_spec.rb +221 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/spec_helper.rb +46 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/clixml/error_record.xml.erb +84 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/clixml/pipeline_state.xml.erb +88 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/get_command_output_response.xml.erb +13 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/get_command_output_response_not_done.xml.erb +10 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/get_omi_command_output_response.xml.erb +23 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/get_omi_command_output_response_not_done.xml.erb +24 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/get_omi_config_response.xml +45 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/get_omi_powershell_keepalive_response.xml.erb +33 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/get_powershell_keepalive_response.xml.erb +10 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/get_powershell_output_response.xml.erb +12 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/get_powershell_output_response_not_done.xml.erb +9 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/open_shell_omi.xml +43 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/open_shell_v1.xml +19 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/open_shell_v2.xml +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/soap_fault_omi.xml +31 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/soap_fault_v1.xml +36 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/soap_fault_v2.xml +42 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/wmi_error_v2.xml +41 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/wsmv/cleanup_command_spec.rb +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/wsmv/close_shell_spec.rb +15 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/wsmv/command_output_decoder_spec.rb +35 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/wsmv/command_output_spec.rb +43 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/wsmv/command_spec.rb +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/wsmv/configuration_spec.rb +15 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/wsmv/create_pipeline_spec.rb +30 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/wsmv/create_shell_spec.rb +39 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/wsmv/init_runspace_pool_spec.rb +38 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/wsmv/keep_alive_spec.rb +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/wsmv/receive_response_reader_spec.rb +124 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/wsmv/send_data_spec.rb +30 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/wsmv/wql_query_spec.rb +11 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/wsmv/write_stdin_spec.rb +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/winrm.gemspec +46 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/.gitignore +11 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/.rspec +2 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/.rubocop.yml +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/.rubocop_todo.yml +65 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/.travis.yml +10 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/Gemfile +4 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/LICENSE +202 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/README.md +82 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/Rakefile +27 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/VERSION +1 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/Vagrantfile +8 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/appveyor.yml +38 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/bin/rwinrmcp +85 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/changelog.md +74 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/lib/winrm-fs/core/file_transporter.rb +566 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/lib/winrm-fs/core/tmp_zip.rb +176 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/lib/winrm-fs/exceptions.rb +27 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/lib/winrm-fs/file_manager.rb +156 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/lib/winrm-fs/scripts/check_files.ps1.erb +49 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/lib/winrm-fs/scripts/checksum.ps1.erb +13 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/lib/winrm-fs/scripts/create_dir.ps1.erb +6 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/lib/winrm-fs/scripts/delete.ps1.erb +6 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/lib/winrm-fs/scripts/download.ps1.erb +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/lib/winrm-fs/scripts/exists.ps1.erb +10 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/lib/winrm-fs/scripts/extract_files.ps1.erb +52 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/lib/winrm-fs/scripts/scripts.rb +31 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/lib/winrm-fs.rb +27 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/spec/config-example.yml +3 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/spec/integration/file_manager_spec.rb +303 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/spec/integration/tmp_zip_spec.rb +26 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/spec/matchers.rb +57 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/spec/spec_helper.rb +66 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/spec/unit/tmp_zip_spec.rb +78 -0
- data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/winrm-fs.gemspec +36 -0
- data/vendor/bundle/ruby/2.5.0/specifications/vagrant_cloud-2.0.1.gemspec +45 -0
- data/vendor/bundle/ruby/2.5.0/specifications/winrm-2.3.0.gemspec +73 -0
- data/vendor/bundle/ruby/2.5.0/specifications/winrm-fs-1.3.1.gemspec +57 -0
- data/version.txt +1 -1
- metadata +268 -4
@@ -0,0 +1,65 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module GuestWindows
|
3
|
+
module Cap
|
4
|
+
class FileSystem
|
5
|
+
# Create a temporary file or directory on the guest
|
6
|
+
#
|
7
|
+
# @param [Vagrant::Machine] machine Vagrant guest machine
|
8
|
+
# @param [Hash] opts Path options
|
9
|
+
# @return [String] path to temporary file or directory
|
10
|
+
def self.create_tmp_path(machine, opts)
|
11
|
+
comm = machine.communicate
|
12
|
+
path = ""
|
13
|
+
cmd = "Write-Output ([System.IO.Path]::Combine([System.IO.Path]::GetTempPath(), " \
|
14
|
+
"[System.IO.Path]::GetRandomFileName())) | Out-String -Width 2048"
|
15
|
+
comm.execute(cmd, shell: :powershell) do |type, data|
|
16
|
+
if type == :stdout
|
17
|
+
path << data
|
18
|
+
end
|
19
|
+
end
|
20
|
+
path.strip!
|
21
|
+
if opts[:extension]
|
22
|
+
path << opts[:extension].to_s
|
23
|
+
end
|
24
|
+
if opts[:type] == :directory
|
25
|
+
comm.execute("[System.IO.Directory]::CreateDirectory('#{path}')")
|
26
|
+
end
|
27
|
+
path
|
28
|
+
end
|
29
|
+
|
30
|
+
# Decompress zip file on guest to given location
|
31
|
+
#
|
32
|
+
# @param [Vagrant::Machine] machine Vagrant guest machine
|
33
|
+
# @param [String] compressed_file Path to compressed file on guest
|
34
|
+
# @param [String] destination Path for decompressed files on guest
|
35
|
+
def self.decompress_zip(machine, compressed_file, destination, opts={})
|
36
|
+
comm = machine.communicate
|
37
|
+
extract_dir = create_tmp_path(machine, type: :directory)
|
38
|
+
cmds = []
|
39
|
+
destination = destination.tr("/", "\\")
|
40
|
+
if opts[:type] == :directory
|
41
|
+
cmds << "New-Item -ItemType Directory -Force -Path \"#{destination}\""
|
42
|
+
else
|
43
|
+
d_parts = destination.split("\\")
|
44
|
+
d_parts.pop
|
45
|
+
parent_dir = d_parts.join("\\") + "\\"
|
46
|
+
cmds << "New-Item -ItemType Directory -Force -Path \"#{parent_dir}\""
|
47
|
+
end
|
48
|
+
cmd = "$f = \"#{compressed_file}\"; $d = \"#{extract_dir}\"; "
|
49
|
+
cmd << '$s = New-Object -ComObject "Shell.Application"; $z = $s.NameSpace($f); '
|
50
|
+
cmd << 'foreach($i in $z.items()){ $s.Namespace($d).copyhere($i); }'
|
51
|
+
cmds << cmd
|
52
|
+
cmds += [
|
53
|
+
"Move-Item -Force -Path \"#{extract_dir}\\*\" -Destination \"#{destination}\\\"",
|
54
|
+
"Remove-Item -Path \"#{compressed_file}\" -Force",
|
55
|
+
"Remove-Item -Path \"#{extract_dir}\" -Recurse -Force"
|
56
|
+
]
|
57
|
+
cmds.each do |cmd|
|
58
|
+
comm.execute(cmd, shell: :powershell)
|
59
|
+
end
|
60
|
+
true
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
@@ -22,7 +22,7 @@ module VagrantPlugins
|
|
22
22
|
# Ensure password is scrubbed
|
23
23
|
Vagrant::Util::CredentialScrubber.sensitive(options[:smb_password])
|
24
24
|
end
|
25
|
-
machine.communicate.execute("cmdkey /add:#{options[:smb_host]} /user:#{options[:smb_username]} /pass
|
25
|
+
machine.communicate.execute("cmdkey /add:#{options[:smb_host]} /user:#{options[:smb_username]} /pass:\"#{options[:smb_password]}\"", {shell: :powershell, elevated: true})
|
26
26
|
mount_shared_folder(machine, name, guestpath, "\\\\#{options[:smb_host]}\\")
|
27
27
|
end
|
28
28
|
|
@@ -34,6 +34,16 @@ module VagrantPlugins
|
|
34
34
|
Cap::Halt
|
35
35
|
end
|
36
36
|
|
37
|
+
guest_capability(:windows, :create_tmp_path) do
|
38
|
+
require_relative "cap/file_system"
|
39
|
+
Cap::FileSystem
|
40
|
+
end
|
41
|
+
|
42
|
+
guest_capability(:windows, :decompress_zip) do
|
43
|
+
require_relative "cap/file_system"
|
44
|
+
Cap::FileSystem
|
45
|
+
end
|
46
|
+
|
37
47
|
guest_capability(:windows, :mount_virtualbox_shared_folder) do
|
38
48
|
require_relative "cap/mount_shared_folder"
|
39
49
|
Cap::MountSharedFolder
|
@@ -22,6 +22,7 @@ module VagrantPlugins
|
|
22
22
|
attr_accessor :base_mac
|
23
23
|
attr_accessor :boot_timeout
|
24
24
|
attr_accessor :box
|
25
|
+
attr_accessor :ignore_box_vagrantfile
|
25
26
|
attr_accessor :box_check_update
|
26
27
|
attr_accessor :box_url
|
27
28
|
attr_accessor :box_server_url
|
@@ -51,6 +52,7 @@ module VagrantPlugins
|
|
51
52
|
@base_mac = UNSET_VALUE
|
52
53
|
@boot_timeout = UNSET_VALUE
|
53
54
|
@box = UNSET_VALUE
|
55
|
+
@ignore_box_vagrantfile = UNSET_VALUE
|
54
56
|
@box_check_update = UNSET_VALUE
|
55
57
|
@box_download_ca_cert = UNSET_VALUE
|
56
58
|
@box_download_ca_path = UNSET_VALUE
|
@@ -377,6 +379,7 @@ module VagrantPlugins
|
|
377
379
|
@base_mac = nil if @base_mac == UNSET_VALUE
|
378
380
|
@boot_timeout = 300 if @boot_timeout == UNSET_VALUE
|
379
381
|
@box = nil if @box == UNSET_VALUE
|
382
|
+
@ignore_box_vagrantfile = false if @ignore_box_vagrantfile == UNSET_VALUE
|
380
383
|
|
381
384
|
if @box_check_update == UNSET_VALUE
|
382
385
|
@box_check_update = !present?(ENV["VAGRANT_BOX_UPDATE_CHECK_DISABLE"])
|
@@ -72,6 +72,23 @@ module VagrantPlugins
|
|
72
72
|
# @return [Integer, Array]
|
73
73
|
attr_accessor :exit_codes
|
74
74
|
|
75
|
+
# If set to true, trigger will halt Vagrant immediately and exit 0
|
76
|
+
# Can also be configured to have a custom exit code
|
77
|
+
#
|
78
|
+
# @return [Integer]
|
79
|
+
attr_accessor :abort
|
80
|
+
|
81
|
+
# Internal reader for the internal variable ruby_block
|
82
|
+
#
|
83
|
+
# @return [Proc]
|
84
|
+
attr_reader :ruby_block
|
85
|
+
|
86
|
+
# Variable used to store ruby proc when defining a ruby trigger
|
87
|
+
# with the "hash" syntax
|
88
|
+
#
|
89
|
+
# @return [Proc]
|
90
|
+
attr_accessor :ruby
|
91
|
+
|
75
92
|
def initialize(command)
|
76
93
|
@logger = Log4r::Logger.new("vagrant::config::vm::trigger::config")
|
77
94
|
|
@@ -84,14 +101,27 @@ module VagrantPlugins
|
|
84
101
|
@run = UNSET_VALUE
|
85
102
|
@run_remote = UNSET_VALUE
|
86
103
|
@exit_codes = UNSET_VALUE
|
104
|
+
@abort = UNSET_VALUE
|
105
|
+
@ruby = UNSET_VALUE
|
87
106
|
|
88
107
|
# Internal options
|
89
108
|
@id = SecureRandom.uuid
|
90
109
|
@command = command.to_sym
|
110
|
+
@ruby_block = UNSET_VALUE
|
91
111
|
|
92
112
|
@logger.debug("Trigger defined for command: #{command}")
|
93
113
|
end
|
94
114
|
|
115
|
+
# Config option `ruby` for a trigger which reads in a ruby block and sets
|
116
|
+
# it to be evaluated when the configured trigger fires. This method is only
|
117
|
+
# invoked when the regular "block" syntax is used. Otherwise the proc is
|
118
|
+
# set through the attr_accessor if the hash syntax is used.
|
119
|
+
#
|
120
|
+
# @param [Proc] block
|
121
|
+
def ruby(&block)
|
122
|
+
@ruby_block = block
|
123
|
+
end
|
124
|
+
|
95
125
|
def finalize!
|
96
126
|
# Ensure all config options are set to nil or default value if untouched
|
97
127
|
# by user
|
@@ -104,8 +134,13 @@ module VagrantPlugins
|
|
104
134
|
@run_remote = nil if @run_remote == UNSET_VALUE
|
105
135
|
@only_on = nil if @only_on == UNSET_VALUE
|
106
136
|
@exit_codes = DEFAULT_EXIT_CODE if @exit_codes == UNSET_VALUE
|
137
|
+
@abort = nil if @abort == UNSET_VALUE
|
138
|
+
|
139
|
+
@ruby_block = nil if @ruby_block == UNSET_VALUE
|
140
|
+
@ruby = nil if @ruby == UNSET_VALUE
|
141
|
+
@ruby_block = @ruby if @ruby
|
107
142
|
|
108
|
-
#
|
143
|
+
# These values are expected to always be an Array internally,
|
109
144
|
# but can be set as a single String or Symbol
|
110
145
|
#
|
111
146
|
# Guests are stored internally as strings
|
@@ -149,6 +184,9 @@ module VagrantPlugins
|
|
149
184
|
@run_remote = new_run
|
150
185
|
end
|
151
186
|
|
187
|
+
if @abort == true
|
188
|
+
@abort = 1
|
189
|
+
end
|
152
190
|
end
|
153
191
|
|
154
192
|
# @return [Array] array of strings of error messages from config option validation
|
@@ -208,6 +246,16 @@ module VagrantPlugins
|
|
208
246
|
end
|
209
247
|
end
|
210
248
|
|
249
|
+
if @abort && !@abort.is_a?(Integer)
|
250
|
+
errors << I18n.t("vagrant.config.triggers.abort_bad_type", cmd: @command)
|
251
|
+
elsif @abort == false
|
252
|
+
machine.ui.warn(I18n.t("vagrant.config.triggers.abort_false_type"))
|
253
|
+
end
|
254
|
+
|
255
|
+
if @ruby_block && !ruby_block.is_a?(Proc)
|
256
|
+
errors << I18n.t("vagrant.config.triggers.ruby_bad_type", cmd: @command)
|
257
|
+
end
|
258
|
+
|
211
259
|
errors
|
212
260
|
end
|
213
261
|
|
@@ -17,9 +17,11 @@ module VagrantPlugins
|
|
17
17
|
machine = env[:machine]
|
18
18
|
build_dir = env[:build_dir]
|
19
19
|
build_dir ||= machine.provider_config.build_dir
|
20
|
-
|
20
|
+
git_repo = env[:git_repo]
|
21
|
+
git_repo ||= machine.provider_config.git_repo
|
22
|
+
|
21
23
|
# If we're not building a container, then just skip this step
|
22
|
-
return @app.call(env) if !build_dir
|
24
|
+
return @app.call(env) if (!build_dir && !git_repo)
|
23
25
|
|
24
26
|
# Try to read the image ID from the cache file if we've
|
25
27
|
# already built it.
|
@@ -41,18 +43,31 @@ module VagrantPlugins
|
|
41
43
|
args = machine.provider_config.build_args.clone
|
42
44
|
if machine.provider_config.dockerfile
|
43
45
|
dockerfile = machine.provider_config.dockerfile
|
44
|
-
dockerfile_path = File.join(build_dir, dockerfile)
|
46
|
+
dockerfile_path = build_dir ? File.join(build_dir, dockerfile) : dockerfile
|
45
47
|
|
46
48
|
args.push("--file").push(dockerfile_path)
|
47
|
-
|
48
|
-
|
49
|
-
|
49
|
+
if build_dir
|
50
|
+
machine.ui.output(
|
51
|
+
I18n.t("docker_provider.building_named_dockerfile",
|
52
|
+
file: machine.provider_config.dockerfile))
|
53
|
+
else
|
54
|
+
machine.ui.output(
|
55
|
+
I18n.t("docker_provider.building_git_repo_named_dockerfile",
|
56
|
+
file: machine.provider_config.dockerfile,
|
57
|
+
repo: git_repo))
|
58
|
+
end
|
50
59
|
else
|
51
|
-
|
60
|
+
if build_dir
|
61
|
+
machine.ui.output(I18n.t("docker_provider.building"))
|
62
|
+
else
|
63
|
+
machine.ui.output(
|
64
|
+
I18n.t("docker_provider.building_git_repo",
|
65
|
+
repo: git_repo))
|
66
|
+
end
|
52
67
|
end
|
53
68
|
|
54
69
|
image = machine.provider.driver.build(
|
55
|
-
build_dir,
|
70
|
+
build_dir || git_repo,
|
56
71
|
extra_args: args) do |type, data|
|
57
72
|
data = remove_ansi_escape_codes(data.chomp).chomp
|
58
73
|
env[:ui].detail(data) if data != ""
|
@@ -14,11 +14,19 @@ module VagrantPlugins
|
|
14
14
|
attr_accessor :build_args
|
15
15
|
|
16
16
|
# The directory with a Dockerfile to build and use as the basis
|
17
|
-
# for this container. If this is set, "image"
|
17
|
+
# for this container. If this is set, neither "image" nor "git_repo"
|
18
|
+
# should be set.
|
18
19
|
#
|
19
20
|
# @return [String]
|
20
21
|
attr_accessor :build_dir
|
21
22
|
|
23
|
+
# The URL for a git repository with a Dockerfile to build and use
|
24
|
+
# as the basis for this container. If this is set, neither "image"
|
25
|
+
# nor "build_dir" should be set.
|
26
|
+
#
|
27
|
+
# @return [String]
|
28
|
+
attr_accessor :git_repo
|
29
|
+
|
22
30
|
# Use docker-compose to manage the lifecycle and environment for
|
23
31
|
# containers instead of using docker directly.
|
24
32
|
#
|
@@ -149,6 +157,7 @@ module VagrantPlugins
|
|
149
157
|
def initialize
|
150
158
|
@build_args = []
|
151
159
|
@build_dir = UNSET_VALUE
|
160
|
+
@git_repo = UNSET_VALUE
|
152
161
|
@cmd = UNSET_VALUE
|
153
162
|
@compose = UNSET_VALUE
|
154
163
|
@compose_configuration = {}
|
@@ -185,14 +194,39 @@ module VagrantPlugins
|
|
185
194
|
super.tap do |result|
|
186
195
|
# This is a bit confusing. The tests explain the purpose of this
|
187
196
|
# better than the code lets on, I believe.
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
197
|
+
has_image = (other.image != UNSET_VALUE)
|
198
|
+
has_build_dir = (other.build_dir != UNSET_VALUE)
|
199
|
+
has_git_repo = (other.git_repo != UNSET_VALUE)
|
200
|
+
|
201
|
+
if (has_image ^ has_build_dir ^ has_git_repo) && !(has_image && has_build_dir && has_git_repo)
|
202
|
+
# image
|
203
|
+
if has_image
|
204
|
+
if @build_dir != UNSET_VALUE
|
205
|
+
result.build_dir = nil
|
206
|
+
end
|
207
|
+
if @git_repo != UNSET_VALUE
|
208
|
+
result.git_repo = nil
|
209
|
+
end
|
192
210
|
end
|
193
211
|
|
194
|
-
|
195
|
-
|
212
|
+
# build_dir
|
213
|
+
if has_build_dir
|
214
|
+
if @image != UNSET_VALUE
|
215
|
+
result.image = nil
|
216
|
+
end
|
217
|
+
if @git_repo != UNSET_VALUE
|
218
|
+
result.git_repo = nil
|
219
|
+
end
|
220
|
+
end
|
221
|
+
|
222
|
+
# git_repo
|
223
|
+
if has_git_repo
|
224
|
+
if @build_dir != UNSET_VALUE
|
225
|
+
result.build_dir = nil
|
226
|
+
end
|
227
|
+
if @image != UNSET_VALUE
|
228
|
+
result.image = nil
|
229
|
+
end
|
196
230
|
end
|
197
231
|
end
|
198
232
|
|
@@ -214,6 +248,7 @@ module VagrantPlugins
|
|
214
248
|
def finalize!
|
215
249
|
@build_args = [] if @build_args == UNSET_VALUE
|
216
250
|
@build_dir = nil if @build_dir == UNSET_VALUE
|
251
|
+
@git_repo = nil if @git_repo == UNSET_VALUE
|
217
252
|
@cmd = [] if @cmd == UNSET_VALUE
|
218
253
|
@compose = false if @compose == UNSET_VALUE
|
219
254
|
@create_args = [] if @create_args == UNSET_VALUE
|
@@ -262,11 +297,11 @@ module VagrantPlugins
|
|
262
297
|
def validate(machine)
|
263
298
|
errors = _detected_errors
|
264
299
|
|
265
|
-
if @build_dir
|
266
|
-
errors << I18n.t("docker_provider.errors.config.
|
300
|
+
if [@build_dir, @git_repo, @image].compact.size > 1
|
301
|
+
errors << I18n.t("docker_provider.errors.config.both_build_and_image_and_git")
|
267
302
|
end
|
268
303
|
|
269
|
-
if !@build_dir && !@image
|
304
|
+
if !@build_dir && !@git_repo && !@image
|
270
305
|
errors << I18n.t("docker_provider.errors.config.build_dir_or_image")
|
271
306
|
end
|
272
307
|
|
@@ -277,6 +312,11 @@ module VagrantPlugins
|
|
277
312
|
end
|
278
313
|
end
|
279
314
|
|
315
|
+
# Comparison logic taken directly from docker's urlutil.go
|
316
|
+
if @git_repo && !( @git_repo =~ /^http(?:s)?:\/\/.*.git(?:#.+)?$/ || @git_repo =~ /^git(?:hub\.com|@|:\/\/)/)
|
317
|
+
errors << I18n.t("docker_provider.errors.config.git_repo_invalid")
|
318
|
+
end
|
319
|
+
|
280
320
|
if !@compose_configuration.is_a?(Hash)
|
281
321
|
errors << I18n.t("docker_provider.errors.config.compose_configuration_hash")
|
282
322
|
end
|
@@ -91,7 +91,14 @@ if($EnableCheckpoints) {
|
|
91
91
|
}
|
92
92
|
|
93
93
|
try {
|
94
|
-
Hyper-V\Set-VM -
|
94
|
+
if((Get-Command Hyper-V\Set-VM).Parameters["CheckpointType"] -eq $null) {
|
95
|
+
if($CheckpointAction -eq "enable") {
|
96
|
+
Write-ErrorMessage "CheckpointType is not available. Cannot enable checkpoints."
|
97
|
+
exit 1
|
98
|
+
}
|
99
|
+
} else {
|
100
|
+
Hyper-V\Set-VM -VM $VM -CheckpointType $checkpoints
|
101
|
+
}
|
95
102
|
} catch {
|
96
103
|
Write-ErrorMessage "Failed to ${CheckpointAction} checkpoints on VM: ${PSItem}"
|
97
104
|
exit 1
|
@@ -106,7 +113,14 @@ if($EnableAutomaticCheckpoints) {
|
|
106
113
|
}
|
107
114
|
|
108
115
|
try {
|
109
|
-
Hyper-V\Set-VM -
|
116
|
+
if((Get-Command Hyper-V\Set-VM).Parameters["AutomaticCheckpointsEnabled"] -eq $null) {
|
117
|
+
if($autochecks -eq 1) {
|
118
|
+
Write-ErrorMessage "AutomaticCheckpointsEnabled is not available"
|
119
|
+
exit 1
|
120
|
+
}
|
121
|
+
} else {
|
122
|
+
Hyper-V\Set-VM -VM $VM -AutomaticCheckpointsEnabled $autochecks
|
123
|
+
}
|
110
124
|
} catch {
|
111
125
|
Write-ErrorMessage "Failed to ${AutoAction} automatic checkpoints on VM: ${PSItem}"
|
112
126
|
exit 1
|
@@ -10,11 +10,14 @@ module VagrantPlugins
|
|
10
10
|
# If we cloned, we don't need a base mac, it is already set!
|
11
11
|
return @app.call(env) if env[:machine].config.vm.clone
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
if env[:machine].config.vm.base_mac
|
14
|
+
# Create the proc which we want to use to modify the virtual machine
|
15
|
+
env[:ui].info I18n.t("vagrant.actions.vm.match_mac.matching")
|
16
|
+
env[:machine].provider.driver.set_mac_address(env[:machine].config.vm.base_mac)
|
17
|
+
else
|
18
|
+
env[:ui].info I18n.t("vagrant.actions.vm.match_mac.generating")
|
19
|
+
env[:machine].provider.driver.set_mac_address(nil)
|
20
|
+
end
|
18
21
|
|
19
22
|
@app.call(env)
|
20
23
|
end
|
@@ -125,7 +125,8 @@ module VagrantPlugins
|
|
125
125
|
inventory_basedir = File.join(config.tmp_path, "inventory")
|
126
126
|
inventory_path = File.join(inventory_basedir, "vagrant_ansible_local_inventory")
|
127
127
|
|
128
|
-
|
128
|
+
@machine.communicate.sudo("mkdir -p #{inventory_basedir}")
|
129
|
+
@machine.communicate.sudo("chown -R -h #{@machine.ssh_info[:username]} #{config.tmp_path}")
|
129
130
|
@machine.communicate.sudo("rm -f #{inventory_path}", error_check: false)
|
130
131
|
|
131
132
|
Tempfile.open("vagrant-ansible-local-inventory-#{@machine.name}") do |f|
|
@@ -159,13 +160,6 @@ module VagrantPlugins
|
|
159
160
|
return machines
|
160
161
|
end
|
161
162
|
|
162
|
-
def create_and_chown_remote_folder(path)
|
163
|
-
@machine.communicate.tap do |comm|
|
164
|
-
comm.sudo("mkdir -p #{path}")
|
165
|
-
comm.sudo("chown -h #{@machine.ssh_info[:username]} #{path}")
|
166
|
-
end
|
167
|
-
end
|
168
|
-
|
169
163
|
def check_path(path, test_args, option_name)
|
170
164
|
# Checks for the existence of given file (or directory) on the guest system,
|
171
165
|
# and error if it doesn't exist.
|
@@ -259,9 +259,11 @@ module VagrantPlugins
|
|
259
259
|
env_vars.map! do |env_var_string|
|
260
260
|
"$env:#{env_var_string}"
|
261
261
|
end
|
262
|
+
env_vars = env_vars.join("; ")
|
263
|
+
env_vars << ";"
|
264
|
+
else
|
265
|
+
env_vars = env_vars.join(" ")
|
262
266
|
end
|
263
|
-
|
264
|
-
env_vars = env_vars.join(" ")
|
265
267
|
end
|
266
268
|
|
267
269
|
command = [
|
@@ -6,7 +6,7 @@ cd `mktemp -d`
|
|
6
6
|
if [ -x /usr/bin/fetch ]; then
|
7
7
|
/usr/bin/fetch -o bootstrap-salt.sh https://raw.githubusercontent.com/saltstack/salt-bootstrap/stable/bootstrap-salt.sh
|
8
8
|
elif [ -x /usr/bin/curl ]; then
|
9
|
-
/usr/bin/curl -L -O https://raw.githubusercontent.com/saltstack/salt-bootstrap/stable/bootstrap-salt.sh
|
9
|
+
/usr/bin/curl --silent --show-error -L -O https://raw.githubusercontent.com/saltstack/salt-bootstrap/stable/bootstrap-salt.sh
|
10
10
|
elif [ -x /usr/bin/wget ]; then
|
11
11
|
/usr/bin/wget -O bootstrap-salt.sh https://raw.githubusercontent.com/saltstack/salt-bootstrap/stable/bootstrap-salt.sh
|
12
12
|
else
|
@@ -110,11 +110,11 @@ module VagrantPlugins
|
|
110
110
|
|
111
111
|
# Generates option string for bootstrap script
|
112
112
|
def bootstrap_options(install, configure, config_dir)
|
113
|
-
options = ""
|
114
|
-
|
115
113
|
# Any extra options passed to bootstrap
|
116
114
|
if @config.bootstrap_options
|
117
|
-
options =
|
115
|
+
options = @config.bootstrap_options
|
116
|
+
else
|
117
|
+
options = ""
|
118
118
|
end
|
119
119
|
|
120
120
|
if @config.master_json_config && @machine.config.vm.communicator != :winrm
|
@@ -176,7 +176,19 @@ module VagrantPlugins
|
|
176
176
|
## Actions
|
177
177
|
# Get pillar string to pass with the salt command
|
178
178
|
def get_pillar
|
179
|
-
|
179
|
+
if !@config.pillar_data.empty?
|
180
|
+
if @machine.config.vm.communicator == :winrm
|
181
|
+
# ' doesn't have any special behavior on the command prompt,
|
182
|
+
# so '{"x":"y"}' becomes '{x:y}' with literal single quotes.
|
183
|
+
# However, """ will become " , and \\""" will become \" .
|
184
|
+
# Use \\"" instead of \\""" for literal inner-value quotes
|
185
|
+
# to avoid issue with odd number of quotes.
|
186
|
+
# --% disables special PowerShell parsing on the rest of the line.
|
187
|
+
" --% pillar=#{@config.pillar_data.to_json.gsub(/(?<!\\)\"/, '"""').gsub(/\\\"/, %q(\\\\\""))}"
|
188
|
+
else
|
189
|
+
" pillar='#{@config.pillar_data.to_json}'"
|
190
|
+
end
|
191
|
+
end
|
180
192
|
end
|
181
193
|
|
182
194
|
# Get colorization option string to pass with the salt command
|
@@ -304,6 +316,9 @@ module VagrantPlugins
|
|
304
316
|
end
|
305
317
|
bootstrap_destination = File.join(config_dir, "bootstrap_salt.ps1")
|
306
318
|
else
|
319
|
+
if @config.version
|
320
|
+
options += " %s" % @config.version
|
321
|
+
end
|
307
322
|
bootstrap_destination = File.join(config_dir, "bootstrap_salt.sh")
|
308
323
|
end
|
309
324
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require "ipaddr"
|
2
2
|
require "shellwords"
|
3
|
+
require "tmpdir"
|
3
4
|
|
4
5
|
require "vagrant/util/platform"
|
5
6
|
require "vagrant/util/subprocess"
|
@@ -81,7 +82,7 @@ module VagrantPlugins
|
|
81
82
|
# too long for unix domain sockets.
|
82
83
|
control_options = ""
|
83
84
|
unless Vagrant::Util::Platform.windows?
|
84
|
-
controlpath =
|
85
|
+
controlpath = Dir.mktmpdir("vagrant-rsync-")
|
85
86
|
control_options = "-o ControlMaster=auto -o ControlPath=#{controlpath} -o ControlPersist=10m "
|
86
87
|
end
|
87
88
|
|
@@ -0,0 +1,11 @@
|
|
1
|
+
Host <%= host_key %>
|
2
|
+
HostName <%= winrm_host %>
|
3
|
+
User <%= winrm_user %>
|
4
|
+
Password <%= winrm_password %>
|
5
|
+
Port <%= winrm_port %>
|
6
|
+
<% if rdp_port -%>
|
7
|
+
RDPHostName <%= rdp_host %>
|
8
|
+
RDPPort <%= rdp_port %>
|
9
|
+
RDPUser <%= rdp_user %>
|
10
|
+
RDPPassword <%= rdp_pass %>
|
11
|
+
<% end -%>
|
@@ -0,0 +1 @@
|
|
1
|
+
inet6 <%= options[:ip] %> <%= options[:netmask] %> NONE
|