vagrant-unbundled 1.8.1.2 → 1.8.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -13
- data/.travis.yml +3 -0
- data/CHANGELOG.md +167 -4
- data/LICENSE +1 -1
- data/README.md +7 -9
- data/RELEASE.md +28 -0
- data/bin/vagrant +1 -1
- data/contrib/bash/completion.sh +6 -1
- data/contrib/sudoers/linux-fedora +1 -1
- data/keys/README.md +1 -1
- data/lib/vagrant/action/builtin/box_add.rb +7 -3
- data/lib/vagrant/action/general/package.rb +47 -13
- data/lib/vagrant/box.rb +1 -1
- data/lib/vagrant/box_collection.rb +3 -4
- data/lib/vagrant/bundler.rb +29 -11
- data/lib/vagrant/machine.rb +14 -5
- data/lib/vagrant/ui.rb +1 -1
- data/lib/vagrant/util/is_port_open.rb +1 -1
- data/lib/vagrant/util/platform.rb +67 -42
- data/plugins/commands/box/command/remove.rb +1 -1
- data/plugins/commands/box/command/update.rb +10 -0
- data/plugins/commands/destroy/command.rb +1 -1
- data/plugins/commands/halt/command.rb +1 -1
- data/plugins/commands/init/command.rb +8 -2
- data/plugins/commands/login/client.rb +19 -1
- data/plugins/commands/package/command.rb +1 -1
- data/plugins/commands/plugin/command/mixin_install_opts.rb +1 -1
- data/plugins/commands/plugin/gem_helper.rb +1 -1
- data/plugins/commands/port/command.rb +1 -1
- data/plugins/commands/rdp/command.rb +1 -1
- data/plugins/commands/resume/command.rb +15 -1
- data/plugins/commands/snapshot/command/pop.rb +16 -1
- data/plugins/commands/snapshot/command/push_shared.rb +7 -9
- data/plugins/commands/snapshot/command/restore.rb +14 -1
- data/plugins/commands/ssh/command.rb +2 -1
- data/plugins/commands/ssh_config/command.rb +1 -1
- data/plugins/commands/status/command.rb +1 -1
- data/plugins/commands/suspend/command.rb +1 -1
- data/plugins/commands/up/command.rb +4 -4
- data/plugins/communicators/ssh/communicator.rb +2 -2
- data/plugins/communicators/winrm/communicator.rb +11 -11
- data/plugins/communicators/winrm/config.rb +7 -1
- data/plugins/communicators/winrm/shell.rb +41 -41
- data/plugins/guests/amazon/cap/flavor.rb +14 -0
- data/plugins/guests/amazon/guest.rb +9 -0
- data/plugins/guests/amazon/plugin.rb +20 -0
- data/plugins/guests/arch/cap/change_host_name.rb +15 -6
- data/plugins/guests/arch/cap/configure_networks.rb +33 -14
- data/plugins/guests/arch/plugin.rb +1 -1
- data/plugins/guests/atomic/cap/change_host_name.rb +16 -1
- data/plugins/guests/atomic/plugin.rb +2 -2
- data/plugins/guests/coreos/cap/change_host_name.rb +10 -4
- data/plugins/guests/coreos/cap/configure_networks.rb +49 -37
- data/plugins/guests/coreos/guest.rb +2 -0
- data/plugins/guests/coreos/plugin.rb +1 -1
- data/plugins/guests/darwin/cap/change_host_name.rb +25 -7
- data/plugins/guests/darwin/cap/choose_addressable_ip_addr.rb +7 -7
- data/plugins/guests/darwin/cap/insert_public_key.rb +19 -7
- data/plugins/guests/darwin/guest.rb +1 -1
- data/plugins/guests/darwin/plugin.rb +1 -1
- data/plugins/guests/debian/cap/change_host_name.rb +37 -84
- data/plugins/guests/debian/cap/configure_networks.rb +61 -46
- data/plugins/guests/debian/cap/nfs_client.rb +5 -4
- data/plugins/guests/debian/cap/rsync.rb +6 -3
- data/plugins/guests/debian/cap/smb.rb +6 -7
- data/plugins/guests/debian/guest.rb +2 -0
- data/plugins/guests/debian/plugin.rb +1 -1
- data/plugins/guests/fedora/cap/change_host_name.rb +18 -64
- data/plugins/guests/fedora/cap/configure_networks.rb +10 -9
- data/plugins/guests/fedora/plugin.rb +1 -1
- data/plugins/guests/freebsd/cap/change_host_name.rb +21 -3
- data/plugins/guests/freebsd/cap/configure_networks.rb +45 -30
- data/plugins/guests/freebsd/cap/halt.rb +1 -1
- data/plugins/guests/freebsd/cap/insert_public_key.rb +21 -8
- data/plugins/guests/freebsd/cap/mount_nfs_folder.rb +10 -7
- data/plugins/guests/freebsd/cap/rsync.rb +1 -11
- data/plugins/guests/freebsd/plugin.rb +1 -1
- data/plugins/guests/funtoo/cap/configure_networks.rb +10 -6
- data/plugins/guests/gentoo/cap/configure_networks.rb +9 -8
- data/plugins/guests/linux/cap/choose_addressable_ip_addr.rb +6 -6
- data/plugins/guests/linux/cap/insert_public_key.rb +18 -8
- data/plugins/guests/linux/cap/mount_nfs.rb +16 -12
- data/plugins/guests/linux/cap/mount_smb_shared_folder.rb +2 -2
- data/plugins/guests/linux/cap/mount_virtualbox_shared_folder.rb +1 -1
- data/plugins/guests/linux/guest.rb +0 -2
- data/plugins/guests/linux/plugin.rb +1 -1
- data/plugins/guests/mint/guest.rb +0 -2
- data/plugins/guests/mint/plugin.rb +1 -1
- data/plugins/guests/netbsd/cap/configure_networks.rb +8 -8
- data/plugins/guests/nixos/cap/change_host_name.rb +11 -8
- data/plugins/guests/nixos/cap/configure_networks.rb +12 -9
- data/plugins/guests/omnios/cap/change_host_name.rb +17 -5
- data/plugins/guests/omnios/cap/mount_nfs_folder.rb +10 -4
- data/plugins/guests/omnios/cap/rsync.rb +11 -0
- data/plugins/guests/omnios/guest.rb +0 -2
- data/plugins/guests/omnios/plugin.rb +6 -1
- data/plugins/guests/openbsd/cap/configure_networks.rb +8 -6
- data/plugins/guests/photon/cap/change_host_name.rb +17 -4
- data/plugins/guests/photon/cap/configure_networks.rb +14 -26
- data/plugins/guests/photon/guest.rb +1 -1
- data/plugins/guests/photon/plugin.rb +12 -12
- data/plugins/guests/pld/cap/change_host_name.rb +21 -9
- data/plugins/guests/pld/guest.rb +0 -2
- data/plugins/guests/pld/plugin.rb +1 -1
- data/plugins/guests/redhat/cap/change_host_name.rb +30 -96
- data/plugins/guests/redhat/cap/configure_networks.rb +44 -50
- data/plugins/guests/redhat/cap/flavor.rb +3 -4
- data/plugins/guests/redhat/cap/nfs_client.rb +13 -25
- data/plugins/guests/redhat/cap/rsync.rb +6 -6
- data/plugins/guests/redhat/guest.rb +0 -2
- data/plugins/guests/redhat/plugin.rb +1 -10
- data/plugins/guests/slackware/cap/change_host_name.rb +19 -8
- data/plugins/guests/slackware/cap/configure_networks.rb +30 -14
- data/plugins/guests/slackware/guest.rb +0 -2
- data/plugins/guests/slackware/plugin.rb +1 -1
- data/plugins/guests/smartos/config.rb +3 -15
- data/plugins/guests/suse/cap/change_host_name.rb +15 -7
- data/plugins/guests/suse/cap/configure_networks.rb +31 -37
- data/plugins/guests/suse/cap/nfs_client.rb +5 -6
- data/plugins/guests/suse/cap/rsync.rb +1 -3
- data/plugins/guests/suse/guest.rb +0 -2
- data/plugins/guests/suse/plugin.rb +1 -1
- data/plugins/guests/tinycore/cap/mount_nfs.rb +46 -0
- data/plugins/guests/tinycore/plugin.rb +5 -0
- data/plugins/guests/trisquel/guest.rb +9 -0
- data/plugins/guests/trisquel/plugin.rb +15 -0
- data/plugins/guests/ubuntu/cap/change_host_name.rb +42 -41
- data/plugins/guests/ubuntu/guest.rb +0 -2
- data/plugins/guests/ubuntu/plugin.rb +1 -3
- data/plugins/guests/windows/guest_network.rb +1 -1
- data/plugins/hosts/arch/cap/nfs.rb +3 -19
- data/plugins/hosts/darwin/cap/provider_install_virtualbox.rb +4 -5
- data/plugins/hosts/darwin/cap/rdp.rb +34 -6
- data/plugins/hosts/gentoo/cap/nfs.rb +1 -1
- data/plugins/hosts/windows/cap/provider_install_virtualbox.rb +4 -5
- data/plugins/hosts/windows/cap/ps.rb +2 -2
- data/plugins/hosts/windows/cap/rdp.rb +8 -17
- data/plugins/kernel_v2/config/ssh_connect.rb +6 -0
- data/plugins/kernel_v2/config/vm.rb +3 -1
- data/plugins/providers/docker/action.rb +3 -3
- data/plugins/providers/docker/action/create.rb +1 -1
- data/plugins/providers/docker/command/exec.rb +104 -0
- data/plugins/providers/docker/config.rb +9 -1
- data/plugins/providers/docker/errors.rb +4 -0
- data/plugins/providers/docker/plugin.rb +6 -0
- data/plugins/providers/docker/provider.rb +1 -2
- data/plugins/providers/hyperv/action.rb +56 -1
- data/plugins/providers/hyperv/action/import.rb +13 -5
- data/plugins/providers/hyperv/action/snapshot_delete.rb +27 -0
- data/plugins/providers/hyperv/action/snapshot_restore.rb +23 -0
- data/plugins/providers/hyperv/action/snapshot_save.rb +27 -0
- data/plugins/providers/hyperv/cap/snapshot_list.rb +11 -0
- data/plugins/providers/hyperv/config.rb +5 -2
- data/plugins/providers/hyperv/driver.rb +18 -1
- data/plugins/providers/hyperv/plugin.rb +5 -0
- data/plugins/providers/hyperv/scripts/clone_vhd.ps1 +9 -0
- data/plugins/providers/hyperv/scripts/create_snapshot.ps1 +8 -0
- data/plugins/providers/hyperv/scripts/delete_snapshot.ps1 +8 -0
- data/plugins/providers/hyperv/scripts/get_vm_status.ps1 +8 -2
- data/plugins/providers/hyperv/scripts/import_vm.ps1 +5 -1
- data/plugins/providers/hyperv/scripts/list_snapshots.ps1 +12 -0
- data/plugins/providers/hyperv/scripts/restore_snapshot.ps1 +8 -0
- data/plugins/providers/virtualbox/action.rb +9 -4
- data/plugins/providers/virtualbox/action/import_master.rb +81 -75
- data/plugins/providers/virtualbox/action/package.rb +1 -29
- data/plugins/providers/virtualbox/action/package_setup_files.rb +51 -0
- data/plugins/providers/virtualbox/action/package_setup_folders.rb +38 -0
- data/plugins/providers/virtualbox/action/prepare_nfs_settings.rb +23 -1
- data/plugins/providers/virtualbox/action/setup_package_files.rb +9 -43
- data/plugins/providers/virtualbox/driver/version_4_1.rb +104 -6
- data/plugins/providers/virtualbox/driver/version_4_2.rb +6 -5
- data/plugins/providers/virtualbox/driver/version_4_3.rb +6 -5
- data/plugins/providers/virtualbox/driver/version_5_0.rb +6 -5
- data/plugins/provisioners/ansible/cap/guest/arch/ansible_install.rb +8 -3
- data/plugins/provisioners/ansible/cap/guest/debian/ansible_install.rb +26 -4
- data/plugins/provisioners/ansible/cap/guest/facts.rb +24 -0
- data/plugins/provisioners/ansible/cap/guest/fedora/ansible_install.rb +16 -6
- data/plugins/provisioners/ansible/cap/guest/freebsd/ansible_install.rb +7 -2
- data/plugins/provisioners/ansible/cap/guest/pip/pip.rb +28 -0
- data/plugins/provisioners/ansible/cap/guest/posix/ansible_installed.rb +1 -1
- data/plugins/provisioners/ansible/cap/guest/redhat/ansible_install.rb +24 -7
- data/plugins/provisioners/ansible/cap/guest/suse/ansible_install.rb +6 -2
- data/plugins/provisioners/ansible/cap/guest/ubuntu/ansible_install.rb +17 -6
- data/plugins/provisioners/ansible/config/base.rb +15 -23
- data/plugins/provisioners/ansible/config/guest.rb +9 -22
- data/plugins/provisioners/ansible/config/host.rb +9 -19
- data/plugins/provisioners/ansible/errors.rb +4 -0
- data/plugins/provisioners/ansible/helpers.rb +4 -24
- data/plugins/provisioners/ansible/provisioner/base.rb +58 -10
- data/plugins/provisioners/ansible/provisioner/guest.rb +55 -22
- data/plugins/provisioners/ansible/provisioner/host.rb +50 -9
- data/plugins/provisioners/chef/cap/linux/chef_installed.rb +2 -2
- data/plugins/provisioners/chef/cap/omnios/chef_installed.rb +3 -3
- data/plugins/provisioners/chef/cap/redhat/chef_install.rb +7 -11
- data/plugins/provisioners/chef/cap/suse/chef_install.rb +27 -0
- data/plugins/provisioners/chef/cap/windows/chef_installed.rb +1 -1
- data/plugins/provisioners/chef/command_builder.rb +1 -0
- data/plugins/provisioners/chef/config/base.rb +5 -6
- data/plugins/provisioners/chef/config/chef_solo.rb +6 -0
- data/plugins/provisioners/chef/installer.rb +2 -2
- data/plugins/provisioners/chef/omnibus.rb +1 -1
- data/plugins/provisioners/chef/plugin.rb +5 -0
- data/plugins/provisioners/chef/provisioner/base.rb +52 -56
- data/plugins/provisioners/chef/provisioner/chef_apply.rb +9 -10
- data/plugins/provisioners/chef/provisioner/chef_client.rb +1 -1
- data/plugins/provisioners/chef/provisioner/chef_solo.rb +1 -0
- data/plugins/provisioners/docker/client.rb +22 -4
- data/plugins/provisioners/puppet/provisioner/puppet.rb +3 -3
- data/plugins/provisioners/salt/provisioner.rb +19 -24
- data/plugins/pushes/ftp/adapter.rb +18 -1
- data/plugins/pushes/heroku/locales/en.yml +1 -1
- data/plugins/synced_folders/rsync/helper.rb +1 -1
- data/templates/commands/init/Vagrantfile.erb +6 -3
- data/templates/commands/init/Vagrantfile.min.erb +1 -1
- data/templates/commands/ssh_config/config.erb +5 -1
- data/templates/guests/debian/network_dhcp.erb +2 -2
- data/templates/guests/debian/network_static.erb +2 -2
- data/templates/guests/debian/network_static6.erb +2 -2
- data/templates/guests/fedora/network_static6.erb +9 -0
- data/templates/guests/freebsd/network_dhcp.erb +2 -1
- data/templates/guests/freebsd/network_static.erb +1 -1
- data/templates/guests/slackware/network_dhcp.erb +8 -20
- data/templates/guests/slackware/network_static.erb +10 -22
- data/templates/guests/suse/network_dhcp.erb +1 -1
- data/templates/guests/suse/network_static.erb +3 -3
- data/templates/locales/en.yml +35 -18
- data/templates/locales/providers_docker.yml +8 -0
- data/templates/provisioners/chef_solo/solo.erb +7 -7
- data/test/support/isolated_environment.rb +1 -1
- data/test/unit/base.rb +9 -1
- data/test/unit/plugins/commands/box/command/update_test.rb +7 -1
- data/test/unit/plugins/commands/init/command_test.rb +86 -0
- data/test/unit/plugins/commands/login/client_test.rb +7 -0
- data/test/unit/plugins/commands/ssh_config/command_test.rb +2 -14
- data/test/unit/plugins/communicators/winrm/shell_test.rb +40 -16
- data/test/unit/plugins/guests/amazon/cap/flavor_test.rb +19 -0
- data/test/unit/plugins/guests/arch/cap/change_host_name_test.rb +38 -0
- data/test/unit/plugins/guests/arch/cap/configure_networks_test.rb +55 -0
- data/test/unit/plugins/guests/atomic/cap/change_host_name_test.rb +38 -0
- data/test/unit/plugins/guests/atomic/cap/docker_test.rb +28 -0
- data/test/unit/plugins/guests/coreos/cap/change_host_name_test.rb +37 -0
- data/test/unit/plugins/guests/coreos/cap/configure_networks_test.rb +59 -0
- data/test/unit/plugins/guests/coreos/cap/docker_test.rb +28 -0
- data/test/unit/plugins/guests/darwin/cap/change_host_name_test.rb +40 -0
- data/test/unit/plugins/guests/darwin/cap/choose_addressable_ip_addr_test.rb +36 -0
- data/test/unit/plugins/guests/debian/cap/change_host_name_test.rb +23 -16
- data/test/unit/plugins/guests/debian/cap/configure_networks_test.rb +54 -0
- data/test/unit/plugins/guests/debian/cap/nfs_client_test.rb +30 -0
- data/test/unit/plugins/guests/debian/cap/rsync_test.rb +38 -0
- data/test/unit/plugins/guests/debian/cap/smb_test.rb +38 -0
- data/test/unit/plugins/guests/freebsd/cap/change_host_name_test.rb +40 -0
- data/test/unit/plugins/guests/freebsd/cap/configure_networks_test.rb +51 -0
- data/test/unit/plugins/guests/freebsd/cap/halt_test.rb +35 -0
- data/test/unit/plugins/guests/freebsd/cap/insert_public_key_test.rb +31 -0
- data/test/unit/plugins/guests/freebsd/cap/mount_nfs_folder_test.rb +53 -0
- data/test/unit/plugins/guests/freebsd/cap/rsync_test.rb +46 -0
- data/test/unit/plugins/guests/linux/cap/choose_addressable_ip_addr_test.rb +38 -0
- data/test/unit/plugins/guests/linux/cap/halt_test.rb +36 -0
- data/test/unit/plugins/guests/linux/cap/insert_public_key_test.rb +32 -0
- data/test/unit/plugins/guests/linux/cap/mount_nfs_test.rb +78 -0
- data/test/unit/plugins/guests/linux/cap/mount_shared_folder_test.rb +1 -1
- data/test/unit/plugins/guests/linux/cap/nfs_client_test.rb +29 -0
- data/test/unit/plugins/guests/linux/cap/port_test.rb +30 -0
- data/test/unit/plugins/guests/omnios/cap/change_host_name_test.rb +41 -0
- data/test/unit/plugins/guests/omnios/cap/mount_nfs_folder_test.rb +47 -0
- data/test/unit/plugins/guests/omnios/cap/rsync_test.rb +29 -0
- data/test/unit/plugins/guests/photon/cap/change_host_name_test.rb +26 -18
- data/test/unit/plugins/guests/photon/cap/configure_networks_test.rb +37 -26
- data/test/unit/plugins/guests/photon/cap/docker_test.rb +17 -12
- data/test/unit/plugins/guests/pld/cap/change_host_name_test.rb +39 -0
- data/test/unit/plugins/guests/pld/cap/flavor_test.rb +21 -0
- data/test/unit/plugins/guests/pld/cap/network_scripts_dir_test.rb +21 -0
- data/test/unit/plugins/guests/redhat/cap/change_host_name_test.rb +23 -51
- data/test/unit/plugins/guests/redhat/cap/configure_networks_test.rb +80 -0
- data/test/unit/plugins/guests/redhat/cap/flavor_test.rb +40 -0
- data/test/unit/plugins/guests/redhat/cap/network_scripts_dir_test.rb +21 -0
- data/test/unit/plugins/guests/redhat/cap/nfs_client_test.rb +30 -0
- data/test/unit/plugins/guests/redhat/cap/rsync_test.rb +29 -0
- data/test/unit/plugins/guests/slackware/cap/change_host_name_test.rb +40 -0
- data/test/unit/plugins/guests/slackware/cap/configure_networks_test.rb +48 -0
- data/test/unit/plugins/guests/smartos/cap/change_host_name_test.rb +2 -2
- data/test/unit/plugins/guests/smartos/cap/configure_networks_test.rb +1 -1
- data/test/unit/plugins/guests/smartos/cap/halt_test.rb +1 -1
- data/test/unit/plugins/guests/smartos/cap/mount_nfs_test.rb +1 -1
- data/test/unit/plugins/guests/smartos/cap/rsync_test.rb +1 -1
- data/test/unit/plugins/guests/suse/cap/change_host_name_test.rb +40 -0
- data/test/unit/plugins/guests/suse/cap/configure_networks_test.rb +60 -0
- data/test/unit/plugins/guests/suse/cap/halt_test.rb +36 -0
- data/test/unit/plugins/guests/suse/cap/network_scripts_dir_test.rb +19 -0
- data/test/unit/plugins/guests/suse/cap/nfs_client_test.rb +31 -0
- data/test/unit/plugins/guests/suse/cap/rsync_test.rb +38 -0
- data/test/unit/plugins/guests/tinycore/cap/change_host_name_test.rb +1 -1
- data/test/unit/plugins/guests/ubuntu/cap/change_host_name_test.rb +24 -16
- data/test/unit/plugins/guests/windows/cap/change_host_name_test.rb +1 -1
- data/test/unit/plugins/guests/windows/cap/halt_test.rb +1 -1
- data/test/unit/plugins/guests/windows/cap/mount_shared_folder_test.rb +1 -1
- data/test/unit/plugins/guests/windows/cap/reboot_test.rb +1 -1
- data/test/unit/plugins/guests/windows/cap/rsync_test.rb +1 -1
- data/test/unit/plugins/hosts/darwin/cap/rdp_test.rb +36 -0
- data/test/unit/plugins/kernel_v2/config/vm_test.rb +27 -1
- data/test/unit/plugins/providers/docker/action/create_test.rb +55 -0
- data/test/unit/plugins/providers/docker/command/exec_test.rb +44 -0
- data/test/unit/plugins/providers/docker/config_test.rb +7 -2
- data/test/unit/plugins/providers/virtualbox/action/prepare_nfs_settings_test.rb +18 -0
- data/test/unit/plugins/provisioners/ansible/config/guest_test.rb +83 -0
- data/test/unit/plugins/provisioners/ansible/config/host_test.rb +98 -0
- data/test/unit/plugins/provisioners/ansible/config/shared.rb +107 -0
- data/test/unit/plugins/provisioners/ansible/provisioner_test.rb +82 -10
- data/test/unit/plugins/provisioners/chef/config/base_test.rb +2 -2
- data/test/unit/plugins/provisioners/chef/provisioner/base_test.rb +29 -0
- data/test/unit/plugins/pushes/atlas/push_test.rb +12 -8
- data/test/unit/plugins/pushes/ftp/adapter_test.rb +1 -1
- data/test/unit/plugins/pushes/ftp/push_test.rb +5 -4
- data/test/unit/support/isolated_environment.rb +4 -4
- data/test/unit/support/shared/base_context.rb +11 -3
- data/test/unit/templates/guests/arch/network_dhcp_test.rb +2 -2
- data/test/unit/templates/guests/arch/network_static_test.rb +4 -4
- data/test/unit/templates/guests/debian/network_dhcp_test.rb +6 -6
- data/test/unit/templates/guests/debian/network_static_test.rb +6 -6
- data/test/unit/templates/guests/fedora/network_static6_test.rb +25 -0
- data/test/unit/templates/guests/freebsd/network_dhcp_test.rb +5 -2
- data/test/unit/templates/guests/freebsd/network_static_test.rb +13 -17
- data/test/unit/templates/guests/suse/network_dhcp_test.rb +2 -2
- data/test/unit/templates/guests/suse/network_static_test.rb +4 -4
- data/test/unit/vagrant/action/builtin/box_add_test.rb +33 -31
- data/test/unit/vagrant/action/builtin/lock_test.rb +5 -2
- data/test/unit/vagrant/action/builtin/mixin_synced_folders_test.rb +6 -2
- data/test/unit/vagrant/action/builtin/synced_folder_cleanup_test.rb +5 -1
- data/test/unit/vagrant/action/builtin/synced_folders_test.rb +5 -1
- data/test/unit/vagrant/box_collection_test.rb +19 -7
- data/test/unit/vagrant/box_test.rb +13 -2
- data/test/unit/vagrant/config_test.rb +1 -1
- data/test/unit/vagrant/environment_test.rb +16 -12
- data/test/unit/vagrant/machine_index_test.rb +5 -1
- data/test/unit/vagrant/machine_test.rb +5 -1
- data/test/unit/vagrant/plugin/manager_test.rb +1 -5
- data/test/unit/vagrant/plugin/state_file_test.rb +1 -5
- data/test/unit/vagrant/util/platform_test.rb +5 -0
- data/test/unit/vagrant/util/safe_chdir_test.rb +11 -5
- data/test/unit/vagrant/vagrantfile_test.rb +5 -1
- data/vagrant.gemspec +8 -3
- data/version.txt +1 -1
- metadata +3657 -12
- data/CONTRIBUTING.md +0 -41
- data/test/unit/plugins/guests/support/shared/debian_like_host_name_examples.rb +0 -106
- data/test/unit/plugins/guests/support/shared/redhat_like_host_name_examples.rb +0 -252
- data/test/unit/plugins/provisioners/ansible/config_test.rb +0 -224
@@ -7,7 +7,7 @@ module VagrantPlugins
|
|
7
7
|
description "Red Hat Enterprise Linux guest support."
|
8
8
|
|
9
9
|
guest("redhat", "linux") do
|
10
|
-
|
10
|
+
require_relative "guest"
|
11
11
|
Guest
|
12
12
|
end
|
13
13
|
|
@@ -36,19 +36,10 @@ module VagrantPlugins
|
|
36
36
|
Cap::NFSClient
|
37
37
|
end
|
38
38
|
|
39
|
-
guest_capability("redhat", "nfs_client_installed") do
|
40
|
-
require_relative "cap/nfs_client"
|
41
|
-
Cap::NFSClient
|
42
|
-
end
|
43
|
-
|
44
39
|
guest_capability("redhat", "rsync_install") do
|
45
40
|
require_relative "cap/rsync"
|
46
41
|
Cap::RSync
|
47
42
|
end
|
48
|
-
|
49
|
-
def self.dnf?(machine)
|
50
|
-
machine.communicate.test("/usr/bin/which -s dnf")
|
51
|
-
end
|
52
43
|
end
|
53
44
|
end
|
54
45
|
end
|
@@ -3,14 +3,25 @@ module VagrantPlugins
|
|
3
3
|
module Cap
|
4
4
|
class ChangeHostName
|
5
5
|
def self.change_host_name(machine, name)
|
6
|
-
machine.communicate
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
6
|
+
comm = machine.communicate
|
7
|
+
|
8
|
+
if !comm.test("hostname -f | grep -w '#{name}'", sudo: false)
|
9
|
+
basename = name.split(".", 2)[0]
|
10
|
+
comm.sudo <<-EOH.gsub(/^ {14}/, '')
|
11
|
+
# Set the hostname
|
12
|
+
chmod o+w /etc/hostname
|
13
|
+
echo '#{name}' > /etc/hostname
|
14
|
+
chmod o-w /etc/hostname
|
15
|
+
hostname -F /etc/hostname
|
16
|
+
|
17
|
+
# Remove comments and blank lines from /etc/hosts
|
18
|
+
sed -i'' -e 's/#.*$//' -e '/^$/d' /etc/hosts
|
19
|
+
|
20
|
+
# Prepend ourselves to /etc/hosts
|
21
|
+
grep -w '#{name}' /etc/hosts || {
|
22
|
+
sed -i'' '1i 127.0.0.1\\t#{name}\\t#{basename}' /etc/hosts
|
23
|
+
}
|
24
|
+
EOH
|
14
25
|
end
|
15
26
|
end
|
16
27
|
end
|
@@ -1,7 +1,6 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
1
|
require "tempfile"
|
3
2
|
|
4
|
-
|
3
|
+
require_relative "../../../../lib/vagrant/util/template_renderer"
|
5
4
|
|
6
5
|
module VagrantPlugins
|
7
6
|
module GuestSlackware
|
@@ -10,25 +9,42 @@ module VagrantPlugins
|
|
10
9
|
include Vagrant::Util
|
11
10
|
|
12
11
|
def self.configure_networks(machine, networks)
|
13
|
-
|
14
|
-
|
12
|
+
comm = machine.communicate
|
13
|
+
|
14
|
+
commands = []
|
15
|
+
interfaces = []
|
16
|
+
|
17
|
+
comm.sudo("ip -o -0 addr | grep -v LOOPBACK | awk '{print $2}' | sed 's/://'") do |_, result|
|
15
18
|
interfaces = result.split("\n")
|
16
19
|
end
|
17
20
|
|
18
|
-
|
21
|
+
# Remove any previous configuration
|
22
|
+
commands << "sed -i'' -e '/^#VAGRANT-BEGIN/,/^#VAGRANT-END/ d' /etc/rc.d/rc.inet1.conf"
|
23
|
+
|
24
|
+
networks.each.with_index do |network, i|
|
19
25
|
network[:device] = interfaces[network[:interface]]
|
20
26
|
|
21
|
-
entry = TemplateRenderer.render("guests/slackware/network_#{network[:type]}",
|
27
|
+
entry = TemplateRenderer.render("guests/slackware/network_#{network[:type]}",
|
28
|
+
i: i+1,
|
29
|
+
options: network,
|
30
|
+
)
|
31
|
+
|
32
|
+
remote_path = "/tmp/vagrant-network-#{network[:device]}-#{Time.now}-#{i}"
|
33
|
+
Tempfile.open("vagrant-slackware-configure-networks") do |f|
|
34
|
+
f.binmode
|
35
|
+
f.write(entry)
|
36
|
+
f.fsync
|
37
|
+
f.close
|
38
|
+
comm.upload(f.path, remote_path)
|
39
|
+
end
|
40
|
+
|
41
|
+
commands << "cat '#{remote_path}' >> /etc/rc.d/rc.inet1.conf"
|
42
|
+
end
|
22
43
|
|
23
|
-
|
24
|
-
|
25
|
-
temp.write(entry)
|
26
|
-
temp.close
|
44
|
+
# Restart networking
|
45
|
+
commands << "/etc/rc.d/rc.inet1"
|
27
46
|
|
28
|
-
|
29
|
-
machine.communicate.sudo("mv /tmp/vagrant_network /etc/rc.d/rc.inet1.conf")
|
30
|
-
machine.communicate.sudo("/etc/rc.d/rc.inet1")
|
31
|
-
end
|
47
|
+
comm.sudo(commands.join("\n"))
|
32
48
|
end
|
33
49
|
end
|
34
50
|
end
|
@@ -1,26 +1,14 @@
|
|
1
1
|
module VagrantPlugins
|
2
2
|
module GuestSmartos
|
3
3
|
class Config < Vagrant.plugin("2", :config)
|
4
|
-
|
5
|
-
|
6
|
-
# This sets the command to use to execute items as a superuser. sudo is default
|
4
|
+
# This sets the command to use to execute items as a superuser.
|
5
|
+
# @default sudo
|
7
6
|
attr_accessor :suexec_cmd
|
8
7
|
attr_accessor :device
|
9
8
|
|
10
9
|
def initialize
|
11
|
-
@halt_timeout = UNSET_VALUE
|
12
|
-
@halt_check_interval = UNSET_VALUE
|
13
10
|
@suexec_cmd = 'pfexec'
|
14
|
-
@device
|
15
|
-
end
|
16
|
-
|
17
|
-
def finalize!
|
18
|
-
if @halt_timeout != UNSET_VALUE
|
19
|
-
puts "smartos.halt_timeout is deprecated and will be removed in Vagrant 1.7"
|
20
|
-
end
|
21
|
-
if @halt_check_interval != UNSET_VALUE
|
22
|
-
puts "smartos.halt_check_interval is deprecated and will be removed in Vagrant 1.7"
|
23
|
-
end
|
11
|
+
@device = "e1000g"
|
24
12
|
end
|
25
13
|
end
|
26
14
|
end
|
@@ -3,14 +3,22 @@ module VagrantPlugins
|
|
3
3
|
module Cap
|
4
4
|
class ChangeHostName
|
5
5
|
def self.change_host_name(machine, name)
|
6
|
-
machine.communicate
|
7
|
-
# Only do this if the hostname is not already set
|
8
|
-
if !comm.test("sudo hostname | grep '#{name}'")
|
9
|
-
comm.sudo("echo #{name} > /etc/HOSTNAME")
|
10
|
-
comm.sudo("hostname #{name}")
|
6
|
+
comm = machine.communicate
|
11
7
|
|
12
|
-
|
13
|
-
|
8
|
+
if !comm.test("hostname -f | grep -w '#{name}'", sudo: false)
|
9
|
+
basename = name.split(".", 2)[0]
|
10
|
+
comm.sudo <<-EOH.gsub(/^ {14}/, '')
|
11
|
+
echo '#{name}' > /etc/HOSTNAME
|
12
|
+
hostname '#{name}'
|
13
|
+
|
14
|
+
# Remove comments and blank lines from /etc/hosts
|
15
|
+
sed -i'' -e 's/#.*$//' -e '/^$/d' /etc/hosts
|
16
|
+
|
17
|
+
# Prepend ourselves to /etc/hosts
|
18
|
+
grep -w '#{name}' /etc/hosts || {
|
19
|
+
sed -i'' '1i 127.0.0.1\\t#{name}\\t#{basename}' /etc/hosts
|
20
|
+
}
|
21
|
+
EOH
|
14
22
|
end
|
15
23
|
end
|
16
24
|
end
|
@@ -1,8 +1,6 @@
|
|
1
|
-
require "set"
|
2
1
|
require "tempfile"
|
3
2
|
|
4
|
-
|
5
|
-
require "vagrant/util/template_renderer"
|
3
|
+
require_relative "../../../../lib/vagrant/util/template_renderer"
|
6
4
|
|
7
5
|
module VagrantPlugins
|
8
6
|
module GuestSUSE
|
@@ -12,47 +10,43 @@ module VagrantPlugins
|
|
12
10
|
include Vagrant::Util
|
13
11
|
|
14
12
|
def self.configure_networks(machine, networks)
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
# well as what interfaces we're actually configuring since we use that
|
19
|
-
# later.
|
20
|
-
interfaces = Set.new
|
21
|
-
networks.each do |network|
|
22
|
-
interfaces.add(network[:interface])
|
23
|
-
|
24
|
-
# Remove any previous vagrant configuration in this network interface's
|
25
|
-
# configuration files.
|
26
|
-
machine.communicate.sudo("touch #{network_scripts_dir}/ifcfg-eth#{network[:interface]}")
|
27
|
-
machine.communicate.sudo("sed -e '/^#VAGRANT-BEGIN/,/^#VAGRANT-END/ d' #{network_scripts_dir}/ifcfg-eth#{network[:interface]} > /tmp/vagrant-ifcfg-eth#{network[:interface]}")
|
28
|
-
machine.communicate.sudo("cat /tmp/vagrant-ifcfg-eth#{network[:interface]} > #{network_scripts_dir}/ifcfg-eth#{network[:interface]}")
|
29
|
-
machine.communicate.sudo("rm -f /tmp/vagrant-ifcfg-eth#{network[:interface]}")
|
30
|
-
|
31
|
-
# Render and upload the network entry file to a deterministic
|
32
|
-
# temporary location.
|
33
|
-
entry = TemplateRenderer.render("guests/suse/network_#{network[:type]}",
|
34
|
-
options: network)
|
13
|
+
comm = machine.communicate
|
14
|
+
|
15
|
+
network_scripts_dir = machine.guest.capability(:network_scripts_dir)
|
35
16
|
|
36
|
-
|
37
|
-
|
38
|
-
temp.write(entry)
|
39
|
-
temp.close
|
17
|
+
commands = []
|
18
|
+
interfaces = []
|
40
19
|
|
41
|
-
|
20
|
+
comm.sudo("ip -o -0 addr | grep -v LOOPBACK | awk '{print $2}' | sed 's/://'") do |_, stdout|
|
21
|
+
interfaces = stdout.split("\n")
|
42
22
|
end
|
43
23
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
24
|
+
networks.each.with_index do |network, i|
|
25
|
+
network[:device] = interfaces[network[:interface]]
|
26
|
+
|
27
|
+
entry = TemplateRenderer.render("guests/suse/network_#{network[:type]}",
|
28
|
+
options: network,
|
29
|
+
)
|
30
|
+
|
31
|
+
remote_path = "/tmp/vagrant-network-#{network[:device]}-#{Time.now.to_i}-#{i}"
|
32
|
+
|
33
|
+
Tempfile.open("vagrant-suse-configure-networks") do |f|
|
34
|
+
f.binmode
|
35
|
+
f.write(entry)
|
36
|
+
f.fsync
|
37
|
+
f.close
|
38
|
+
comm.upload(f.path, remote_path)
|
52
39
|
end
|
53
40
|
|
54
|
-
|
41
|
+
local_path = "#{network_scripts_dir}/ifcfg-#{network[:device]}"
|
42
|
+
commands << <<-EOH.gsub(/^ {14}/, '')
|
43
|
+
/sbin/ifdown '#{network[:device]}' || true
|
44
|
+
mv '#{remote_path}' '#{local_path}'
|
45
|
+
/sbin/ifup '#{network[:device]}'
|
46
|
+
EOH
|
55
47
|
end
|
48
|
+
|
49
|
+
comm.sudo(commands.join("\n"))
|
56
50
|
end
|
57
51
|
end
|
58
52
|
end
|
@@ -3,12 +3,11 @@ module VagrantPlugins
|
|
3
3
|
module Cap
|
4
4
|
class NFSClient
|
5
5
|
def self.nfs_client_install(machine)
|
6
|
-
machine.communicate.
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
end
|
6
|
+
machine.communicate.sudo <<-EOH.gsub(/^ {12}/, '')
|
7
|
+
zypper -n install nfs-client
|
8
|
+
/sbin/service rpcbind restart
|
9
|
+
/sbin/service nfs restart
|
10
|
+
EOH
|
12
11
|
end
|
13
12
|
end
|
14
13
|
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require "vagrant/util/retryable"
|
2
|
+
|
3
|
+
module VagrantPlugins
|
4
|
+
module GuestTinyCore
|
5
|
+
module Cap
|
6
|
+
class MountNFS
|
7
|
+
extend Vagrant::Util::Retryable
|
8
|
+
|
9
|
+
def self.mount_nfs_folder(machine, ip, folders)
|
10
|
+
folders.each do |name, opts|
|
11
|
+
# Expand the guest path so we can handle things like "~/vagrant"
|
12
|
+
expanded_guest_path = machine.guest.capability(
|
13
|
+
:shell_expand_guest_path, opts[:guestpath])
|
14
|
+
|
15
|
+
# Do the actual creating and mounting
|
16
|
+
machine.communicate.sudo("mkdir -p #{expanded_guest_path}")
|
17
|
+
|
18
|
+
# Mount
|
19
|
+
hostpath = opts[:hostpath].dup
|
20
|
+
hostpath.gsub!("'", "'\\\\''")
|
21
|
+
|
22
|
+
# Figure out any options
|
23
|
+
mount_opts = ["vers=#{opts[:nfs_version]}"]
|
24
|
+
mount_opts << "udp" if opts[:nfs_udp]
|
25
|
+
if opts[:mount_options]
|
26
|
+
mount_opts = opts[:mount_options].dup
|
27
|
+
end
|
28
|
+
|
29
|
+
mount_command = "mount.nfs -o '#{mount_opts.join(",")}' #{ip}:'#{hostpath}' #{expanded_guest_path}"
|
30
|
+
retryable(on: Vagrant::Errors::LinuxNFSMountFailed, tries: 8, sleep: 3) do
|
31
|
+
machine.communicate.sudo(mount_command,
|
32
|
+
error_class: Vagrant::Errors::LinuxNFSMountFailed)
|
33
|
+
end
|
34
|
+
|
35
|
+
# Emit an upstart event if we can
|
36
|
+
machine.communicate.sudo <<-SCRIPT
|
37
|
+
if command -v /sbin/init && /sbin/init --version | grep upstart; then
|
38
|
+
/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT='#{expanded_guest_path}'
|
39
|
+
fi
|
40
|
+
SCRIPT
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require "vagrant"
|
2
|
+
|
3
|
+
module VagrantPlugins
|
4
|
+
module GuestTrisquel
|
5
|
+
class Plugin < Vagrant.plugin("2")
|
6
|
+
name "Trisquel guest"
|
7
|
+
description "Trisquel guest support."
|
8
|
+
|
9
|
+
guest("trisquel", "ubuntu") do
|
10
|
+
require_relative "guest"
|
11
|
+
Guest
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -1,50 +1,51 @@
|
|
1
1
|
module VagrantPlugins
|
2
2
|
module GuestUbuntu
|
3
3
|
module Cap
|
4
|
-
class ChangeHostName
|
4
|
+
class ChangeHostName
|
5
5
|
def self.change_host_name(machine, name)
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
6
|
+
comm = machine.communicate
|
7
|
+
|
8
|
+
if !comm.test("hostname -f | grep -w '#{name}'")
|
9
|
+
basename = name.split(".", 2)[0]
|
10
|
+
comm.sudo <<-EOH.gsub(/^ {14}/, '')
|
11
|
+
# Set the hostname
|
12
|
+
echo '#{name}' > /etc/hostname
|
13
|
+
hostname -F /etc/hostname
|
14
|
+
|
15
|
+
if command -v hostnamectl; then
|
16
|
+
hostnamectl set-hostname '#{name}'
|
17
|
+
fi
|
18
|
+
|
19
|
+
# Remove comments and blank lines from /etc/hosts
|
20
|
+
sed -i'' -e 's/#.*$//' -e '/^$/d' /etc/hosts
|
21
|
+
|
22
|
+
# Prepend ourselves to /etc/hosts
|
23
|
+
grep -w '#{name}' /etc/hosts || {
|
24
|
+
sed -i'' '1i 127.0.0.1\\t#{name}\\t#{basename}' /etc/hosts
|
25
|
+
}
|
26
|
+
|
27
|
+
# Update mailname
|
28
|
+
echo '#{name}' > /etc/mailname
|
29
|
+
|
30
|
+
# Restart networking and force new DHCP
|
31
|
+
if [ test -f /etc/init.d/hostname ]; then
|
32
|
+
/etc/init.d/hostname start || true
|
33
|
+
fi
|
34
|
+
|
35
|
+
if [ test -f /etc/init.d/hostname.sh ]; then
|
36
|
+
/etc/init.d/hostname.sh start || true
|
37
|
+
fi
|
38
|
+
|
39
|
+
if [ test -f /etc/init.d/networking ]; then
|
40
|
+
/etc/init.d/networking force-reload
|
41
|
+
fi
|
42
|
+
|
43
|
+
if [ test -f /etc/init.d/network-manager ]; then
|
44
|
+
/etc/init.d/network-manager force-reload
|
45
|
+
fi
|
46
|
+
EOH
|
38
47
|
end
|
39
48
|
end
|
40
|
-
|
41
|
-
def os_version(name)
|
42
|
-
machine.communicate.test("[ `lsb_release -c -s` = #{name} ]")
|
43
|
-
end
|
44
|
-
|
45
|
-
def systemd?
|
46
|
-
init_package == 'systemd'
|
47
|
-
end
|
48
49
|
end
|
49
50
|
end
|
50
51
|
end
|