vagrant-unbundled 1.8.4.2 → 1.8.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/CHANGELOG.md +52 -0
- data/Gemfile.lock +9 -7
- data/RELEASE.md +37 -14
- data/lib/vagrant/action/builtin/box_add.rb +3 -1
- data/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb +5 -0
- data/lib/vagrant/box_collection.rb +2 -1
- data/lib/vagrant/bundler.rb +36 -1
- data/lib/vagrant/errors.rb +16 -8
- data/lib/vagrant/plugin/state_file.rb +8 -1
- data/lib/vagrant/util/platform.rb +1 -1
- data/plugins/guests/arch/cap/change_host_name.rb +13 -10
- data/plugins/guests/arch/cap/configure_networks.rb +11 -8
- data/plugins/guests/arch/cap/nfs.rb +35 -0
- data/plugins/guests/arch/cap/rsync.rb +16 -0
- data/plugins/guests/arch/cap/smb.rb +17 -0
- data/plugins/guests/arch/plugin.rb +28 -3
- data/plugins/guests/atomic/cap/change_host_name.rb +13 -10
- data/plugins/guests/atomic/plugin.rb +3 -3
- data/plugins/guests/{netbsd → bsd}/cap/halt.rb +2 -2
- data/plugins/guests/bsd/cap/nfs.rb +49 -0
- data/plugins/guests/bsd/cap/public_key.rb +65 -0
- data/plugins/guests/bsd/cap/virtualbox.rb +16 -0
- data/plugins/guests/bsd/guest.rb +9 -0
- data/plugins/guests/bsd/plugin.rb +40 -0
- data/plugins/guests/coreos/cap/change_host_name.rb +1 -1
- data/plugins/guests/coreos/plugin.rb +4 -4
- data/plugins/guests/darwin/cap/change_host_name.rb +4 -1
- data/plugins/guests/darwin/cap/configure_networks.rb +12 -5
- data/plugins/guests/darwin/cap/halt.rb +3 -1
- data/plugins/guests/darwin/cap/rsync.rb +7 -4
- data/plugins/guests/darwin/plugin.rb +13 -28
- data/plugins/guests/debian/cap/change_host_name.rb +14 -15
- data/plugins/guests/debian/cap/configure_networks.rb +2 -6
- data/plugins/guests/debian/cap/{nfs_client.rb → nfs.rb} +2 -1
- data/plugins/guests/debian/cap/rsync.rb +5 -6
- data/plugins/guests/debian/plugin.rb +8 -8
- data/plugins/guests/esxi/cap/mount_nfs_folder.rb +2 -2
- data/plugins/guests/esxi/plugin.rb +6 -6
- data/plugins/guests/fedora/cap/flavor.rb +1 -1
- data/plugins/guests/fedora/plugin.rb +2 -17
- data/plugins/guests/freebsd/cap/change_host_name.rb +2 -3
- data/plugins/guests/freebsd/cap/rsync.rb +7 -4
- data/plugins/guests/freebsd/plugin.rb +9 -29
- data/plugins/guests/funtoo/plugin.rb +3 -8
- data/plugins/guests/gentoo/cap/change_host_name.rb +21 -6
- data/plugins/guests/gentoo/cap/configure_networks.rb +35 -26
- data/plugins/guests/gentoo/plugin.rb +4 -4
- data/plugins/guests/linux/cap/choose_addressable_ip_addr.rb +2 -3
- data/plugins/guests/linux/cap/mount_virtualbox_shared_folder.rb +31 -45
- data/plugins/guests/linux/cap/network_interfaces.rb +20 -0
- data/plugins/guests/linux/cap/nfs.rb +57 -0
- data/plugins/guests/linux/cap/public_key.rb +65 -0
- data/plugins/guests/linux/cap/rsync.rb +7 -4
- data/plugins/guests/linux/plugin.rb +30 -25
- data/plugins/guests/mint/plugin.rb +1 -1
- data/plugins/guests/netbsd/plugin.rb +10 -30
- data/plugins/guests/nixos/plugin.rb +5 -5
- data/plugins/guests/omnios/cap/change_host_name.rb +1 -1
- data/plugins/guests/omnios/plugin.rb +4 -4
- data/plugins/guests/openbsd/cap/change_host_name.rb +21 -3
- data/plugins/guests/openbsd/plugin.rb +10 -30
- data/plugins/guests/photon/cap/change_host_name.rb +1 -1
- data/plugins/guests/photon/plugin.rb +4 -4
- data/plugins/guests/pld/cap/change_host_name.rb +1 -1
- data/plugins/guests/pld/plugin.rb +4 -4
- data/plugins/guests/redhat/cap/change_host_name.rb +4 -3
- data/plugins/guests/redhat/cap/configure_networks.rb +1 -24
- data/plugins/guests/redhat/plugin.rb +7 -7
- data/plugins/guests/slackware/cap/change_host_name.rb +1 -1
- data/plugins/guests/slackware/cap/configure_networks.rb +1 -5
- data/plugins/guests/slackware/plugin.rb +3 -3
- data/plugins/guests/smartos/plugin.rb +12 -12
- data/plugins/guests/solaris/plugin.rb +14 -14
- data/plugins/guests/solaris11/plugin.rb +12 -12
- data/plugins/guests/suse/cap/change_host_name.rb +1 -1
- data/plugins/guests/suse/cap/configure_networks.rb +1 -5
- data/plugins/guests/suse/plugin.rb +8 -8
- data/plugins/guests/tinycore/cap/mount_nfs.rb +2 -2
- data/plugins/guests/tinycore/plugin.rb +7 -7
- data/plugins/guests/trisquel/plugin.rb +1 -1
- data/plugins/guests/ubuntu/guest.rb +1 -1
- data/plugins/guests/ubuntu/plugin.rb +1 -6
- data/plugins/guests/windows/plugin.rb +2 -2
- data/plugins/kernel_v2/config/vm.rb +8 -1
- data/plugins/providers/hyperv/scripts/get_vm_status.ps1 +25 -5
- data/plugins/providers/virtualbox/driver/meta.rb +1 -0
- data/plugins/providers/virtualbox/driver/version_5_1.rb +734 -0
- data/plugins/providers/virtualbox/plugin.rb +1 -0
- data/plugins/synced_folders/nfs/synced_folder.rb +10 -2
- data/plugins/synced_folders/rsync/helper.rb +11 -4
- data/scripts/{bintray_upload.sh → sign.sh} +0 -0
- data/templates/guests/arch/network_static.erb +3 -3
- data/templates/guests/arch/network_static6.erb +8 -0
- data/templates/guests/freebsd/network_static6.erb +6 -0
- data/templates/guests/funtoo/network_static6.erb +9 -0
- data/templates/guests/gentoo/network_dhcp.erb +1 -1
- data/templates/guests/gentoo/network_static.erb +4 -4
- data/templates/guests/gentoo/network_static6.erb +7 -0
- data/templates/guests/redhat/network_dhcp.erb +1 -1
- data/templates/guests/redhat/network_static.erb +4 -1
- data/templates/guests/{fedora → redhat}/network_static6.erb +5 -2
- data/templates/locales/en.yml +40 -6
- data/test/unit/plugins/guests/arch/cap/change_host_name_test.rb +6 -6
- data/test/unit/plugins/guests/arch/cap/configure_networks_test.rb +20 -15
- data/test/unit/plugins/guests/arch/cap/rsync_test.rb +30 -0
- data/test/unit/plugins/guests/arch/cap/smb_test.rb +38 -0
- data/test/unit/plugins/guests/atomic/cap/change_host_name_test.rb +9 -8
- data/test/unit/plugins/guests/{freebsd → bsd}/cap/halt_test.rb +11 -10
- data/test/unit/plugins/guests/{freebsd → bsd}/cap/insert_public_key_test.rb +7 -6
- data/test/unit/plugins/guests/bsd/cap/nfs_test.rb +68 -0
- data/test/unit/plugins/guests/coreos/cap/change_host_name_test.rb +5 -5
- data/test/unit/plugins/guests/darwin/cap/change_host_name_test.rb +5 -5
- data/test/unit/plugins/guests/darwin/cap/halt_test.rb +36 -0
- data/test/unit/plugins/guests/debian/cap/change_host_name_test.rb +3 -5
- data/test/unit/plugins/guests/debian/cap/configure_networks_test.rb +13 -9
- data/test/unit/plugins/guests/debian/cap/rsync_test.rb +3 -11
- data/test/unit/plugins/guests/freebsd/cap/change_host_name_test.rb +2 -2
- data/test/unit/plugins/guests/linux/cap/mount_nfs_test.rb +16 -3
- data/test/unit/plugins/guests/omnios/cap/change_host_name_test.rb +2 -2
- data/test/unit/plugins/guests/photon/cap/change_host_name_test.rb +2 -2
- data/test/unit/plugins/guests/pld/cap/change_host_name_test.rb +2 -2
- data/test/unit/plugins/guests/redhat/cap/change_host_name_test.rb +4 -3
- data/test/unit/plugins/guests/redhat/cap/configure_networks_test.rb +17 -33
- data/test/unit/plugins/guests/slackware/cap/change_host_name_test.rb +2 -2
- data/test/unit/plugins/guests/slackware/cap/configure_networks_test.rb +8 -4
- data/test/unit/plugins/guests/suse/cap/change_host_name_test.rb +2 -2
- data/test/unit/plugins/guests/suse/cap/configure_networks_test.rb +13 -16
- data/test/unit/plugins/kernel_v2/config/vm_test.rb +10 -2
- data/test/unit/templates/guests/arch/network_static_test.rb +4 -2
- data/test/unit/templates/guests/gentoo/network_dhcp_test.rb +2 -2
- data/test/unit/templates/guests/gentoo/network_static_test.rb +10 -10
- data/test/unit/templates/guests/redhat/network_dhcp_test.rb +2 -2
- data/test/unit/templates/guests/redhat/network_static_test.rb +9 -9
- data/vagrant.gemspec +3 -3
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/CHANGELOG.md +1 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/CONTRIBUTING.md +38 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/LICENSE.txt +22 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/README.md +297 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/bin/listen +12 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/base.rb +141 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/bsd.rb +106 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/config.rb +26 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/darwin.rb +92 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/linux.rb +106 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/polling.rb +37 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/windows.rb +98 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter.rb +45 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/backend.rb +38 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/change.rb +76 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/cli.rb +65 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/directory.rb +87 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/event/config.rb +55 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/event/loop.rb +117 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/event/processor.rb +122 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/event/queue.rb +55 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/file.rb +80 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/fsm.rb +132 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/internals/thread_pool.rb +29 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/listener/config.rb +41 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/listener.rb +133 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/logger.rb +32 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/options.rb +23 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/queue_optimizer.rb +132 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/record/entry.rb +64 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/record/symlink_detector.rb +39 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/record.rb +118 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/silencer/controller.rb +48 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/silencer.rb +97 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/version.rb +3 -0
- data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen.rb +57 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/.gitignore +8 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/.rspec +2 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/.rubocop-disables.yml +384 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/.rubocop.yml +3 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/.travis.yml +43 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/AUTHORS +98 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/Gemfile +11 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/LICENSE +21 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/README.md +667 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/Rakefile +132 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/bin/restclient +92 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/history.md +310 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/rest-client.rb +2 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/rest_client.rb +2 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/abstract_response.rb +226 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/exceptions.rb +244 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/params_array.rb +72 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/payload.rb +209 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/platform.rb +49 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/raw_response.rb +38 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/request.rb +904 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/resource.rb +168 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/response.rb +80 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/utils.rb +235 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/version.rb +8 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/windows/root_certs.rb +105 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/windows.rb +8 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient.rb +184 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/rest-client.gemspec +31 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/rest-client.windows.gemspec +19 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/helpers.rb +22 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/_lib.rb +1 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_digicert/244b5494.0 +19 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_digicert/81b9768f.0 +19 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_digicert/README +8 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_digicert/digicert.crt +19 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_verisign/415660c1.0 +14 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_verisign/7651b327.0 +14 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_verisign/README +8 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_verisign/verisign.crt +14 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/certs/digicert.crt +19 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/certs/verisign.crt +14 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/httpbin_spec.rb +86 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/integration_spec.rb +125 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/request_spec.rb +127 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/spec_helper.rb +29 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/_lib.rb +1 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/abstract_response_spec.rb +145 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/exceptions_spec.rb +108 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/master_shake.jpg +0 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/params_array_spec.rb +36 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/payload_spec.rb +263 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/raw_response_spec.rb +18 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/request2_spec.rb +54 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/request_spec.rb +1265 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/resource_spec.rb +130 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/response_spec.rb +241 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/restclient_spec.rb +79 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/utils_spec.rb +147 -0
- data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/windows/root_certs_spec.rb +22 -0
- data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/.gitignore +10 -0
- data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/.rspec +3 -0
- data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/.rubocop.yml +3 -0
- data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/.travis.yml +11 -0
- data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/LICENSE.txt +21 -0
- data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/README.md +151 -0
- data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep/logger.rb +16 -0
- data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep/quiet.rb +3 -0
- data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep/ruby_version.rb +58 -0
- data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep/travis/ruby_version.rb +59 -0
- data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep/travis.rb +58 -0
- data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep/version.rb +3 -0
- data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep/warning.rb +97 -0
- data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep.rb +2 -0
- data/vendor/bundle/ruby/2.3.0/specifications/listen-3.1.5.gemspec +44 -0
- data/vendor/bundle/ruby/2.3.0/specifications/rest-client-2.0.0.gemspec +60 -0
- data/vendor/bundle/ruby/2.3.0/specifications/ruby_dep-1.4.0.gemspec +34 -0
- data/version.txt +1 -1
- metadata +147 -44
- data/plugins/guests/darwin/cap/insert_public_key.rb +0 -33
- data/plugins/guests/darwin/cap/mount_nfs_folder.rb +0 -37
- data/plugins/guests/darwin/cap/remove_public_key.rb +0 -21
- data/plugins/guests/fedora/cap/change_host_name.rb +0 -29
- data/plugins/guests/fedora/cap/configure_networks.rb +0 -135
- data/plugins/guests/fedora/cap/network_scripts_dir.rb +0 -15
- data/plugins/guests/freebsd/cap/halt.rb +0 -16
- data/plugins/guests/freebsd/cap/insert_public_key.rb +0 -34
- data/plugins/guests/freebsd/cap/mount_nfs_folder.rb +0 -24
- data/plugins/guests/freebsd/cap/remove_public_key.rb +0 -21
- data/plugins/guests/funtoo/cap/change_host_name.rb +0 -17
- data/plugins/guests/linux/cap/insert_public_key.rb +0 -31
- data/plugins/guests/linux/cap/mount_nfs.rb +0 -50
- data/plugins/guests/linux/cap/nfs_client.rb +0 -11
- data/plugins/guests/linux/cap/remove_public_key.rb +0 -24
- data/plugins/guests/netbsd/cap/insert_public_key.rb +0 -21
- data/plugins/guests/netbsd/cap/mount_nfs_folder.rb +0 -17
- data/plugins/guests/netbsd/cap/remove_public_key.rb +0 -21
- data/plugins/guests/openbsd/cap/halt.rb +0 -16
- data/plugins/guests/openbsd/cap/insert_public_key.rb +0 -21
- data/plugins/guests/openbsd/cap/mount_nfs_folder.rb +0 -14
- data/plugins/guests/openbsd/cap/remove_public_key.rb +0 -21
- data/plugins/guests/ubuntu/cap/change_host_name.rb +0 -52
- data/templates/guests/fedora/network_dhcp.erb +0 -6
- data/templates/guests/fedora/network_static.erb +0 -16
- data/test/unit/plugins/guests/freebsd/cap/mount_nfs_folder_test.rb +0 -53
- data/test/unit/plugins/guests/ubuntu/cap/change_host_name_test.rb +0 -42
- data/test/unit/templates/guests/fedora/network_dhcp_test.rb +0 -21
- data/test/unit/templates/guests/fedora/network_static6_test.rb +0 -25
- data/test/unit/templates/guests/fedora/network_static_test.rb +0 -71
@@ -1,11 +1,10 @@
|
|
1
1
|
require_relative "../../../../base"
|
2
2
|
|
3
|
-
describe "VagrantPlugins::
|
4
|
-
let(:
|
5
|
-
VagrantPlugins::
|
3
|
+
describe "VagrantPlugins::GuestBSD::Cap::Halt" do
|
4
|
+
let(:caps) do
|
5
|
+
VagrantPlugins::GuestBSD::Plugin
|
6
6
|
.components
|
7
|
-
.guest_capabilities[:
|
8
|
-
.get(:halt)
|
7
|
+
.guest_capabilities[:bsd]
|
9
8
|
end
|
10
9
|
|
11
10
|
let(:machine) { double("machine") }
|
@@ -20,15 +19,17 @@ describe "VagrantPlugins::GuestFreeBSD::Cap::Halt" do
|
|
20
19
|
end
|
21
20
|
|
22
21
|
describe ".halt" do
|
22
|
+
let(:cap) { caps.get(:halt) }
|
23
|
+
|
23
24
|
it "runs the shutdown command" do
|
24
|
-
comm.expect_command("shutdown -p now")
|
25
|
-
|
25
|
+
comm.expect_command("/sbin/shutdown -p now")
|
26
|
+
cap.halt(machine)
|
26
27
|
end
|
27
28
|
|
28
|
-
it "
|
29
|
-
comm.stub_command("shutdown -p now", raise: IOError)
|
29
|
+
it "ignores an IOError" do
|
30
|
+
comm.stub_command("/sbin/shutdown -p now", raise: IOError)
|
30
31
|
expect {
|
31
|
-
|
32
|
+
cap.halt(machine)
|
32
33
|
}.to_not raise_error
|
33
34
|
end
|
34
35
|
end
|
@@ -1,11 +1,10 @@
|
|
1
1
|
require_relative "../../../../base"
|
2
2
|
|
3
|
-
describe "VagrantPlugins::
|
4
|
-
let(:
|
5
|
-
VagrantPlugins::
|
3
|
+
describe "VagrantPlugins::GuestBSD::Cap::InsertPublicKey" do
|
4
|
+
let(:caps) do
|
5
|
+
VagrantPlugins::GuestBSD::Plugin
|
6
6
|
.components
|
7
|
-
.guest_capabilities[:
|
8
|
-
.get(:insert_public_key)
|
7
|
+
.guest_capabilities[:bsd]
|
9
8
|
end
|
10
9
|
|
11
10
|
let(:machine) { double("machine") }
|
@@ -20,8 +19,10 @@ describe "VagrantPlugins::GuestFreeBSD::Cap::InsertPublicKey" do
|
|
20
19
|
end
|
21
20
|
|
22
21
|
describe ".insert_public_key" do
|
22
|
+
let(:cap) { caps.get(:insert_public_key) }
|
23
|
+
|
23
24
|
it "inserts the public key" do
|
24
|
-
|
25
|
+
cap.insert_public_key(machine, "ssh-rsa ...")
|
25
26
|
expect(comm.received_commands[0]).to match(/mkdir -p ~\/.ssh/)
|
26
27
|
expect(comm.received_commands[0]).to match(/chmod 0700 ~\/.ssh/)
|
27
28
|
expect(comm.received_commands[0]).to match(/cat '\/tmp\/vagrant-(.+)' >> ~\/.ssh\/authorized_keys/)
|
@@ -0,0 +1,68 @@
|
|
1
|
+
require_relative "../../../../base"
|
2
|
+
|
3
|
+
describe "VagrantPlugins::GuestBSD::Cap::NFS" do
|
4
|
+
let(:caps) do
|
5
|
+
VagrantPlugins::GuestBSD::Plugin
|
6
|
+
.components
|
7
|
+
.guest_capabilities[:bsd]
|
8
|
+
end
|
9
|
+
|
10
|
+
let(:machine) { double("machine") }
|
11
|
+
let(:comm) { VagrantTests::DummyCommunicator::Communicator.new(machine) }
|
12
|
+
|
13
|
+
before do
|
14
|
+
allow(machine).to receive(:communicate).and_return(comm)
|
15
|
+
end
|
16
|
+
|
17
|
+
after do
|
18
|
+
comm.verify_expectations!
|
19
|
+
end
|
20
|
+
|
21
|
+
describe ".mount_nfs_folder" do
|
22
|
+
let(:cap) { caps.get(:mount_nfs_folder) }
|
23
|
+
let(:ip) { "1.2.3.4" }
|
24
|
+
|
25
|
+
it "mounts the folder" do
|
26
|
+
folders = {
|
27
|
+
"/vagrant-nfs" => {
|
28
|
+
guestpath: "/guest",
|
29
|
+
hostpath: "/host",
|
30
|
+
}
|
31
|
+
}
|
32
|
+
cap.mount_nfs_folder(machine, ip, folders)
|
33
|
+
|
34
|
+
expect(comm.received_commands[0]).to match(/set -e/)
|
35
|
+
expect(comm.received_commands[0]).to match(/mkdir -p \/guest/)
|
36
|
+
expect(comm.received_commands[0]).to match(/mount -t nfs/)
|
37
|
+
expect(comm.received_commands[0]).to match(/1.2.3.4:\/host \/guest/)
|
38
|
+
end
|
39
|
+
|
40
|
+
it "mounts with options" do
|
41
|
+
folders = {
|
42
|
+
"/vagrant-nfs" => {
|
43
|
+
guestpath: "/guest",
|
44
|
+
hostpath: "/host",
|
45
|
+
nfs_version: 2,
|
46
|
+
nfs_udp: true,
|
47
|
+
mount_options: ["banana"]
|
48
|
+
}
|
49
|
+
}
|
50
|
+
cap.mount_nfs_folder(machine, ip, folders)
|
51
|
+
|
52
|
+
expect(comm.received_commands[0]).to match(/mount -t nfs -o 'nfsv2,mntudp,banana'/)
|
53
|
+
end
|
54
|
+
|
55
|
+
it "escapes host and guest paths" do
|
56
|
+
folders = {
|
57
|
+
"/vagrant-nfs" => {
|
58
|
+
guestpath: "/guest with spaces",
|
59
|
+
hostpath: "/host's",
|
60
|
+
}
|
61
|
+
}
|
62
|
+
cap.mount_nfs_folder(machine, ip, folders)
|
63
|
+
|
64
|
+
expect(comm.received_commands[0]).to match(/host\\\'s/)
|
65
|
+
expect(comm.received_commands[0]).to match(/guest\\\ with\\\ spaces/)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -20,17 +20,17 @@ describe "VagrantPlugins::GuestCoreOS::Cap::ChangeHostName" do
|
|
20
20
|
end
|
21
21
|
|
22
22
|
describe ".change_host_name" do
|
23
|
-
let(:
|
23
|
+
let(:name) { "banana-rama.example.com" }
|
24
24
|
|
25
25
|
it "sets the hostname" do
|
26
|
-
comm.stub_command("hostname
|
26
|
+
comm.stub_command("hostname -f | grep '^#{name}$'", exit_code: 1)
|
27
27
|
comm.expect_command("hostname 'banana-rama'")
|
28
|
-
described_class.change_host_name(machine,
|
28
|
+
described_class.change_host_name(machine, name)
|
29
29
|
end
|
30
30
|
|
31
31
|
it "does not change the hostname if already set" do
|
32
|
-
comm.stub_command("hostname
|
33
|
-
described_class.change_host_name(machine,
|
32
|
+
comm.stub_command("hostname -f | grep '^#{name}$'", exit_code: 0)
|
33
|
+
described_class.change_host_name(machine, name)
|
34
34
|
expect(comm.received_commands.size).to eq(1)
|
35
35
|
end
|
36
36
|
end
|
@@ -20,11 +20,11 @@ describe "VagrantPlugins::GuestDarwin::Cap::ChangeHostName" do
|
|
20
20
|
end
|
21
21
|
|
22
22
|
describe ".change_host_name" do
|
23
|
-
let(:
|
23
|
+
let(:name) { "banana-rama.example.com" }
|
24
24
|
|
25
25
|
it "sets the hostname" do
|
26
|
-
comm.stub_command("hostname -f | grep
|
27
|
-
described_class.change_host_name(machine,
|
26
|
+
comm.stub_command("hostname -f | grep '^#{name}$'", exit_code: 1)
|
27
|
+
described_class.change_host_name(machine, name)
|
28
28
|
expect(comm.received_commands[1]).to match(/scutil --set ComputerName 'banana-rama.example.com'/)
|
29
29
|
expect(comm.received_commands[1]).to match(/scutil --set HostName 'banana-rama.example.com'/)
|
30
30
|
expect(comm.received_commands[1]).to match(/scutil --set LocalHostName 'banana-rama'/)
|
@@ -32,8 +32,8 @@ describe "VagrantPlugins::GuestDarwin::Cap::ChangeHostName" do
|
|
32
32
|
end
|
33
33
|
|
34
34
|
it "does not change the hostname if already set" do
|
35
|
-
comm.stub_command("hostname -f | grep
|
36
|
-
described_class.change_host_name(machine,
|
35
|
+
comm.stub_command("hostname -f | grep '^#{name}$'", exit_code: 0)
|
36
|
+
described_class.change_host_name(machine, name)
|
37
37
|
expect(comm.received_commands.size).to eq(1)
|
38
38
|
end
|
39
39
|
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require_relative "../../../../base"
|
2
|
+
|
3
|
+
describe "VagrantPlugins::GuestDarwin::Cap::Halt" do
|
4
|
+
let(:caps) do
|
5
|
+
VagrantPlugins::GuestDarwin::Plugin
|
6
|
+
.components
|
7
|
+
.guest_capabilities[:darwin]
|
8
|
+
end
|
9
|
+
|
10
|
+
let(:machine) { double("machine") }
|
11
|
+
let(:comm) { VagrantTests::DummyCommunicator::Communicator.new(machine) }
|
12
|
+
|
13
|
+
before do
|
14
|
+
allow(machine).to receive(:communicate).and_return(comm)
|
15
|
+
end
|
16
|
+
|
17
|
+
after do
|
18
|
+
comm.verify_expectations!
|
19
|
+
end
|
20
|
+
|
21
|
+
describe ".halt" do
|
22
|
+
let(:cap) { caps.get(:halt) }
|
23
|
+
|
24
|
+
it "runs the shutdown command" do
|
25
|
+
comm.expect_command("/sbin/shutdown -h now")
|
26
|
+
cap.halt(machine)
|
27
|
+
end
|
28
|
+
|
29
|
+
it "ignores an IOError" do
|
30
|
+
comm.stub_command("/sbin/shutdown -h now", raise: IOError)
|
31
|
+
expect {
|
32
|
+
cap.halt(machine)
|
33
|
+
}.to_not raise_error
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -24,16 +24,14 @@ describe "VagrantPlugins::GuestDebian::Cap::ChangeHostName" do
|
|
24
24
|
let(:name) { 'banana-rama.example.com' }
|
25
25
|
|
26
26
|
it "sets the hostname if not set" do
|
27
|
-
comm.stub_command("hostname -f | grep
|
27
|
+
comm.stub_command("hostname -f | grep '^#{name}$'", exit_code: 1)
|
28
28
|
cap.change_host_name(machine, name)
|
29
29
|
expect(comm.received_commands[1]).to match(/hostname -F \/etc\/hostname/)
|
30
|
-
expect(comm.received_commands[1]).to match(/
|
31
|
-
expect(comm.received_commands[1]).to match(/invoke-rc.d networking force-reload/)
|
32
|
-
expect(comm.received_commands[1]).to match(/invoke-rc.d network-manager force-reload/)
|
30
|
+
expect(comm.received_commands[1]).to match(/hostname.sh start/)
|
33
31
|
end
|
34
32
|
|
35
33
|
it "does not set the hostname if unset" do
|
36
|
-
comm.stub_command("hostname -f | grep
|
34
|
+
comm.stub_command("hostname -f | grep '^#{name}$'", exit_code: 0)
|
37
35
|
cap.change_host_name(machine, name)
|
38
36
|
expect(comm.received_commands.size).to eq(1)
|
39
37
|
end
|
@@ -7,13 +7,12 @@ describe "VagrantPlugins::GuestDebian::Cap::ConfigureNetworks" do
|
|
7
7
|
.guest_capabilities[:debian]
|
8
8
|
end
|
9
9
|
|
10
|
-
let(:
|
10
|
+
let(:guest) { double("guest") }
|
11
|
+
let(:machine) { double("machine", guest: guest) }
|
11
12
|
let(:comm) { VagrantTests::DummyCommunicator::Communicator.new(machine) }
|
12
13
|
|
13
14
|
before do
|
14
15
|
allow(machine).to receive(:communicate).and_return(comm)
|
15
|
-
comm.stub_command("ip -o -0 addr | grep -v LOOPBACK | awk '{print $2}' | sed 's/://'",
|
16
|
-
stdout: "eth1\neth2")
|
17
16
|
end
|
18
17
|
|
19
18
|
after do
|
@@ -23,6 +22,11 @@ describe "VagrantPlugins::GuestDebian::Cap::ConfigureNetworks" do
|
|
23
22
|
describe ".configure_networks" do
|
24
23
|
let(:cap) { caps.get(:configure_networks) }
|
25
24
|
|
25
|
+
before do
|
26
|
+
allow(guest).to receive(:capability).with(:network_interfaces)
|
27
|
+
.and_return(["eth1", "eth2"])
|
28
|
+
end
|
29
|
+
|
26
30
|
let(:network_0) do
|
27
31
|
{
|
28
32
|
interface: 0,
|
@@ -43,12 +47,12 @@ describe "VagrantPlugins::GuestDebian::Cap::ConfigureNetworks" do
|
|
43
47
|
it "creates and starts the networks" do
|
44
48
|
cap.configure_networks(machine, [network_0, network_1])
|
45
49
|
|
46
|
-
expect(comm.received_commands[
|
47
|
-
expect(comm.received_commands[
|
48
|
-
expect(comm.received_commands[
|
49
|
-
expect(comm.received_commands[
|
50
|
-
expect(comm.received_commands[
|
51
|
-
expect(comm.received_commands[
|
50
|
+
expect(comm.received_commands[0]).to match("/sbin/ifdown 'eth1' || true")
|
51
|
+
expect(comm.received_commands[0]).to match("/sbin/ip addr flush dev 'eth1'")
|
52
|
+
expect(comm.received_commands[0]).to match("/sbin/ifdown 'eth2' || true")
|
53
|
+
expect(comm.received_commands[0]).to match("/sbin/ip addr flush dev 'eth2'")
|
54
|
+
expect(comm.received_commands[0]).to match("/sbin/ifup 'eth1'")
|
55
|
+
expect(comm.received_commands[0]).to match("/sbin/ifup 'eth2'")
|
52
56
|
end
|
53
57
|
end
|
54
58
|
end
|
@@ -20,19 +20,11 @@ describe "VagrantPlugins::GuestDebian::Cap:RSync" do
|
|
20
20
|
end
|
21
21
|
|
22
22
|
describe ".rsync_install" do
|
23
|
-
it "installs rsync
|
24
|
-
comm.stub_command("command -v rsync", exit_code: 1)
|
23
|
+
it "installs rsync" do
|
25
24
|
described_class.rsync_install(machine)
|
26
25
|
|
27
|
-
expect(comm.received_commands[
|
28
|
-
expect(comm.received_commands[
|
29
|
-
end
|
30
|
-
|
31
|
-
it "does not install rsync when installed" do
|
32
|
-
comm.stub_command("command -v rsync", exit_code: 0)
|
33
|
-
described_class.rsync_install(machine)
|
34
|
-
|
35
|
-
expect(comm.received_commands.join("")).to_not match(/update/)
|
26
|
+
expect(comm.received_commands[0]).to match(/apt-get -yqq update/)
|
27
|
+
expect(comm.received_commands[0]).to match(/apt-get -yqq install rsync/)
|
36
28
|
end
|
37
29
|
end
|
38
30
|
end
|
@@ -23,7 +23,7 @@ describe "VagrantPlugins::GuestFreeBSD::Cap::ChangeHostName" do
|
|
23
23
|
let(:name) { "banana-rama.example.com" }
|
24
24
|
|
25
25
|
it "sets the hostname and /etc/hosts" do
|
26
|
-
comm.stub_command("hostname -f | grep
|
26
|
+
comm.stub_command("hostname -f | grep '^#{name}$'", exit_code: 1)
|
27
27
|
described_class.change_host_name(machine, name)
|
28
28
|
|
29
29
|
expect(comm.received_commands[1]).to match(/hostname '#{name}'/)
|
@@ -32,7 +32,7 @@ describe "VagrantPlugins::GuestFreeBSD::Cap::ChangeHostName" do
|
|
32
32
|
end
|
33
33
|
|
34
34
|
it "does nothing if the hostname is already set" do
|
35
|
-
comm.stub_command("hostname -f | grep
|
35
|
+
comm.stub_command("hostname -f | grep '^#{name}$'", exit_code: 0)
|
36
36
|
described_class.change_host_name(machine, name)
|
37
37
|
expect(comm.received_commands.size).to eq(1)
|
38
38
|
end
|
@@ -42,8 +42,8 @@ describe "VagrantPlugins::GuestLinux::Cap::MountNFS" do
|
|
42
42
|
}
|
43
43
|
cap.mount_nfs_folder(machine, ip, folders)
|
44
44
|
|
45
|
-
expect(comm.received_commands[0]).to match(/mkdir -p
|
46
|
-
expect(comm.received_commands[0]).to match(/
|
45
|
+
expect(comm.received_commands[0]).to match(/mkdir -p #{guestpath}/)
|
46
|
+
expect(comm.received_commands[0]).to match(/1.2.3.4:#{hostpath} #{guestpath}/)
|
47
47
|
end
|
48
48
|
|
49
49
|
it "mounts with options" do
|
@@ -72,7 +72,20 @@ describe "VagrantPlugins::GuestLinux::Cap::MountNFS" do
|
|
72
72
|
cap.mount_nfs_folder(machine, ip, folders)
|
73
73
|
|
74
74
|
expect(comm.received_commands[0]).to include(
|
75
|
-
"/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT
|
75
|
+
"/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=#{guestpath}")
|
76
|
+
end
|
77
|
+
|
78
|
+
it "escapes host and guest paths" do
|
79
|
+
folders = {
|
80
|
+
"/vagrant-nfs" => {
|
81
|
+
guestpath: "/guest with spaces",
|
82
|
+
hostpath: "/host's",
|
83
|
+
}
|
84
|
+
}
|
85
|
+
cap.mount_nfs_folder(machine, ip, folders)
|
86
|
+
|
87
|
+
expect(comm.received_commands[0]).to match(/host\\\'s/)
|
88
|
+
expect(comm.received_commands[0]).to match(/guest\\\ with\\\ spaces/)
|
76
89
|
end
|
77
90
|
end
|
78
91
|
end
|
@@ -24,7 +24,7 @@ describe "VagrantPlugins::GuestOmniOS::Cap:RSync" do
|
|
24
24
|
let(:name) { "banana-rama.example.com" }
|
25
25
|
|
26
26
|
it "sets the hostname if unset" do
|
27
|
-
comm.stub_command("hostname | grep
|
27
|
+
comm.stub_command("hostname -f | grep '^#{name}$'", exit_code: 1)
|
28
28
|
cap.change_host_name(machine, name)
|
29
29
|
|
30
30
|
expect(comm.received_commands[1]).to match(/echo '#{name}' > \/etc\/nodename/)
|
@@ -32,7 +32,7 @@ describe "VagrantPlugins::GuestOmniOS::Cap:RSync" do
|
|
32
32
|
end
|
33
33
|
|
34
34
|
it "does not set the hostname if set" do
|
35
|
-
comm.stub_command("hostname | grep
|
35
|
+
comm.stub_command("hostname -f | grep '^#{name}$'", exit_code: 0)
|
36
36
|
cap.change_host_name(machine, name)
|
37
37
|
|
38
38
|
expect(comm.received_commands.size).to eq(1)
|
@@ -26,7 +26,7 @@ describe "VagrantPlugins::GuestPhoton::Cap::ChangeHostName" do
|
|
26
26
|
let(:name) { "banana-rama.example.com" }
|
27
27
|
|
28
28
|
it "sets the hostname" do
|
29
|
-
comm.stub_command("hostname -f | grep
|
29
|
+
comm.stub_command("hostname -f | grep '^#{name}$'", exit_code: 1)
|
30
30
|
|
31
31
|
cap.change_host_name(machine, name)
|
32
32
|
expect(comm.received_commands[1]).to match(/echo '#{name}' > \/etc\/hostname/)
|
@@ -34,7 +34,7 @@ describe "VagrantPlugins::GuestPhoton::Cap::ChangeHostName" do
|
|
34
34
|
end
|
35
35
|
|
36
36
|
it "does not change the hostname if already set" do
|
37
|
-
comm.stub_command("hostname -f | grep
|
37
|
+
comm.stub_command("hostname -f | grep '^#{name}$'", exit_code: 0)
|
38
38
|
cap.change_host_name(machine, name)
|
39
39
|
expect(comm.received_commands.size).to eq(1)
|
40
40
|
end
|
@@ -24,14 +24,14 @@ describe "VagrantPlugins::GuestPld::Cap::ChangeHostName" do
|
|
24
24
|
let(:name) { "banana-rama.example.com" }
|
25
25
|
|
26
26
|
it "sets the hostname" do
|
27
|
-
comm.stub_command("hostname | grep
|
27
|
+
comm.stub_command("hostname -f | grep '^#{name}$'", exit_code: 1)
|
28
28
|
|
29
29
|
cap.change_host_name(machine, name)
|
30
30
|
expect(comm.received_commands[1]).to match(/hostname '#{name}'/)
|
31
31
|
end
|
32
32
|
|
33
33
|
it "does not change the hostname if already set" do
|
34
|
-
comm.stub_command("hostname | grep
|
34
|
+
comm.stub_command("hostname -f | grep '^#{name}$'", exit_code: 0)
|
35
35
|
cap.change_host_name(machine, name)
|
36
36
|
expect(comm.received_commands.size).to eq(1)
|
37
37
|
end
|
@@ -24,17 +24,18 @@ describe "VagrantPlugins::GuestRedHat::Cap::ChangeHostName" do
|
|
24
24
|
let(:name) { "banana-rama.example.com" }
|
25
25
|
|
26
26
|
it "sets the hostname" do
|
27
|
-
comm.stub_command("hostname -f | grep
|
27
|
+
comm.stub_command("hostname -f | grep '^#{name}$'", exit_code: 1)
|
28
28
|
|
29
29
|
cap.change_host_name(machine, name)
|
30
30
|
expect(comm.received_commands[1]).to match(/\/etc\/sysconfig\/network/)
|
31
31
|
expect(comm.received_commands[1]).to match(/\/etc\/sysconfig\/network-scripts\/ifcfg/)
|
32
|
-
expect(comm.received_commands[1]).to match(/hostnamectl set-hostname '#{name}'/)
|
32
|
+
expect(comm.received_commands[1]).to match(/hostnamectl set-hostname --static '#{name}'/)
|
33
|
+
expect(comm.received_commands[1]).to match(/hostnamectl set-hostname --transient '#{name}'/)
|
33
34
|
expect(comm.received_commands[1]).to match(/service network restart/)
|
34
35
|
end
|
35
36
|
|
36
37
|
it "does not change the hostname if already set" do
|
37
|
-
comm.stub_command("hostname -f | grep
|
38
|
+
comm.stub_command("hostname -f | grep '^#{name}$'", exit_code: 0)
|
38
39
|
cap.change_host_name(machine, name)
|
39
40
|
expect(comm.received_commands.size).to eq(1)
|
40
41
|
end
|