tnargav 1.2.3 → 1.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +19 -3
- data/CHANGELOG.md +311 -0
- data/bin/vagrant +12 -0
- data/config/default.rb +2 -4
- data/keys/README.md +0 -7
- data/lib/vagrant.rb +7 -0
- data/lib/vagrant/action.rb +2 -0
- data/lib/vagrant/action/builtin/box_add.rb +12 -1
- data/lib/vagrant/action/builtin/confirm.rb +1 -0
- data/lib/vagrant/action/builtin/graceful_halt.rb +9 -5
- data/lib/vagrant/action/builtin/handle_box_url.rb +16 -7
- data/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb +1 -1
- data/lib/vagrant/action/builtin/mixin_provisioners.rb +43 -0
- data/lib/vagrant/action/builtin/nfs.rb +18 -8
- data/lib/vagrant/action/builtin/provision.rb +30 -21
- data/lib/vagrant/action/builtin/provisioner_cleanup.rb +35 -0
- data/lib/vagrant/action/builtin/wait_for_communicator.rb +84 -0
- data/lib/vagrant/action/warden.rb +2 -1
- data/lib/vagrant/box_collection.rb +62 -44
- data/lib/vagrant/cli.rb +1 -9
- data/lib/vagrant/config/v2/root.rb +6 -0
- data/lib/vagrant/environment.rb +27 -51
- data/lib/vagrant/errors.rb +33 -1
- data/lib/vagrant/guest.rb +2 -2
- data/lib/vagrant/machine.rb +14 -22
- data/lib/vagrant/plugin/v2/command.rb +4 -1
- data/lib/vagrant/plugin/v2/communicator.rb +21 -0
- data/lib/vagrant/plugin/v2/guest.rb +1 -56
- data/lib/vagrant/plugin/v2/provisioner.rb +6 -0
- data/lib/vagrant/util/downloader.rb +7 -2
- data/lib/vagrant/util/platform.rb +43 -0
- data/lib/vagrant/util/ssh.rb +5 -0
- data/lib/vagrant/util/subprocess.rb +16 -2
- data/lib/vagrant/version.rb +1 -1
- data/plugins/commands/box/command/remove.rb +22 -2
- data/plugins/commands/box/command/repackage.rb +1 -1
- data/plugins/commands/destroy/command.rb +8 -3
- data/plugins/commands/help/command.rb +12 -0
- data/plugins/commands/help/plugin.rb +17 -0
- data/plugins/commands/plugin/action.rb +11 -0
- data/plugins/commands/plugin/action/install_gem.rb +26 -1
- data/plugins/commands/plugin/action/plugin_exists_check.rb +26 -0
- data/plugins/commands/plugin/command/install.rb +4 -21
- data/plugins/commands/plugin/command/mixin_install_opts.rb +30 -0
- data/plugins/commands/plugin/command/root.rb +5 -0
- data/plugins/commands/plugin/command/update.rb +41 -0
- data/plugins/commands/reload/command.rb +4 -0
- data/plugins/commands/status/command.rb +6 -1
- data/plugins/commands/up/command.rb +10 -0
- data/plugins/commands/up/start_mixins.rb +12 -1
- data/plugins/communicators/ssh/communicator.rb +61 -6
- data/plugins/guests/arch/cap/change_host_name.rb +1 -2
- data/plugins/guests/arch/cap/configure_networks.rb +6 -0
- data/plugins/guests/coreos/cap/change_host_name.rb +15 -0
- data/plugins/guests/coreos/cap/configure_networks.rb +72 -0
- data/plugins/guests/coreos/guest.rb +9 -0
- data/plugins/guests/coreos/plugin.rb +25 -0
- data/plugins/guests/darwin/cap/change_host_name.rb +14 -0
- data/plugins/guests/darwin/cap/configure_networks.rb +52 -0
- data/plugins/guests/darwin/cap/halt.rb +16 -0
- data/plugins/guests/darwin/cap/mount_nfs_folder.rb +25 -0
- data/plugins/guests/darwin/cap/mount_vmware_shared_folder.rb +36 -0
- data/plugins/guests/darwin/cap/shell_expand_guest_path.rb +26 -0
- data/plugins/guests/darwin/cap/verify_vmware_hgfs.rb +12 -0
- data/plugins/guests/darwin/guest.rb +15 -0
- data/plugins/guests/darwin/plugin.rb +50 -0
- data/plugins/guests/debian/cap/change_host_name.rb +1 -0
- data/plugins/guests/gentoo/guest.rb +1 -1
- data/plugins/guests/linux/cap/mount_nfs.rb +9 -1
- data/plugins/guests/linux/cap/mount_virtualbox_shared_folder.rb +26 -7
- data/plugins/guests/linux/cap/shell_expand_guest_path.rb +4 -1
- data/plugins/guests/openbsd/cap/change_host_name.rb +14 -0
- data/plugins/guests/openbsd/cap/configure_networks.rb +40 -0
- data/plugins/guests/openbsd/cap/mount_nfs_folder.rb +14 -0
- data/plugins/guests/openbsd/plugin.rb +15 -0
- data/plugins/guests/solaris/cap/halt.rb +2 -1
- data/plugins/guests/solaris/cap/mount_virtualbox_shared_folder.rb +4 -1
- data/plugins/guests/solaris11/cap/change_host_name.rb +25 -0
- data/plugins/guests/solaris11/cap/configure_networks.rb +32 -0
- data/plugins/guests/solaris11/cap/halt.rb +26 -0
- data/plugins/guests/solaris11/cap/mount_virtualbox_shared_folder.rb +35 -0
- data/plugins/guests/solaris11/config.rb +22 -0
- data/plugins/guests/solaris11/guest.rb +15 -0
- data/plugins/guests/solaris11/plugin.rb +44 -0
- data/plugins/guests/suse/cap/configure_networks.rb +60 -0
- data/plugins/guests/suse/plugin.rb +5 -0
- data/plugins/guests/ubuntu/cap/change_host_name.rb +1 -0
- data/plugins/guests/ubuntu/cap/mount_nfs.rb +19 -0
- data/plugins/guests/ubuntu/cap/mount_virtualbox_shared_folder.rb +14 -0
- data/plugins/guests/ubuntu/guest.rb +0 -19
- data/plugins/guests/ubuntu/plugin.rb +10 -0
- data/plugins/hosts/arch/host.rb +5 -28
- data/plugins/hosts/bsd/host.rb +83 -7
- data/plugins/hosts/fedora/host.rb +12 -6
- data/plugins/hosts/gentoo/host.rb +3 -1
- data/plugins/hosts/linux/host.rb +42 -9
- data/plugins/hosts/opensuse/host.rb +3 -1
- data/plugins/hosts/slackware/host.rb +26 -0
- data/plugins/hosts/slackware/plugin.rb +15 -0
- data/plugins/kernel_v1/config/ssh.rb +2 -2
- data/plugins/kernel_v2/config/ssh.rb +8 -16
- data/plugins/kernel_v2/config/vm.rb +68 -11
- data/plugins/providers/virtualbox/action.rb +15 -2
- data/plugins/providers/virtualbox/action/boot.rb +0 -26
- data/plugins/providers/virtualbox/action/clear_network_interfaces.rb +1 -1
- data/plugins/providers/virtualbox/action/customize.rb +10 -3
- data/plugins/providers/virtualbox/action/destroy_unused_network_interfaces.rb +8 -1
- data/plugins/providers/virtualbox/action/forward_ports.rb +1 -0
- data/plugins/providers/virtualbox/action/import.rb +3 -0
- data/plugins/providers/virtualbox/action/network.rb +14 -2
- data/plugins/providers/virtualbox/action/prepare_nfs_settings.rb +7 -2
- data/plugins/providers/virtualbox/action/set_name.rb +13 -1
- data/plugins/providers/virtualbox/config.rb +39 -2
- data/plugins/providers/virtualbox/driver/base.rb +5 -0
- data/plugins/providers/virtualbox/driver/meta.rb +7 -1
- data/plugins/providers/virtualbox/driver/version_4_0.rb +2 -2
- data/plugins/providers/virtualbox/driver/version_4_1.rb +2 -2
- data/plugins/providers/virtualbox/driver/version_4_2.rb +17 -0
- data/plugins/providers/virtualbox/model/forwarded_port.rb +7 -1
- data/plugins/providers/virtualbox/util/compile_forwarded_ports.rb +5 -1
- data/plugins/provisioners/ansible/config.rb +40 -23
- data/plugins/provisioners/ansible/provisioner.rb +68 -13
- data/plugins/provisioners/cfengine/cap/debian/cfengine_install.rb +1 -1
- data/plugins/provisioners/cfengine/cap/redhat/cfengine_install.rb +1 -1
- data/plugins/provisioners/cfengine/config.rb +7 -1
- data/plugins/provisioners/cfengine/provisioner.rb +4 -5
- data/plugins/provisioners/chef/config/base.rb +31 -0
- data/plugins/provisioners/chef/config/chef_client.rb +15 -6
- data/plugins/provisioners/chef/config/chef_solo.rb +18 -11
- data/plugins/provisioners/chef/provisioner/base.rb +23 -3
- data/plugins/provisioners/chef/provisioner/chef_client.rb +25 -6
- data/plugins/provisioners/chef/provisioner/chef_solo.rb +16 -13
- data/plugins/provisioners/file/config.rb +29 -0
- data/plugins/provisioners/file/plugin.rb +23 -0
- data/plugins/provisioners/file/provisioner.rb +16 -0
- data/plugins/provisioners/puppet/config/puppet.rb +4 -1
- data/plugins/provisioners/puppet/provisioner/puppet.rb +15 -9
- data/plugins/provisioners/puppet/provisioner/puppet_server.rb +9 -2
- data/plugins/provisioners/salt/bootstrap-salt.sh +6 -0
- data/plugins/provisioners/salt/config.rb +105 -0
- data/plugins/provisioners/salt/errors.rb +11 -0
- data/plugins/provisioners/salt/plugin.rb +22 -0
- data/plugins/provisioners/salt/provisioner.rb +249 -0
- data/plugins/provisioners/shell/config.rb +11 -2
- data/plugins/provisioners/shell/provisioner.rb +15 -3
- data/scripts/website_push_docs.sh +12 -0
- data/scripts/website_push_www.sh +12 -0
- data/templates/commands/init/Vagrantfile.erb +5 -2
- data/templates/commands/ssh_config/config.erb +4 -0
- data/templates/guests/coreos/etcd.service.erb +10 -0
- data/templates/guests/fedora/network_static.erb +2 -3
- data/templates/guests/openbsd/network_dhcp.erb +1 -0
- data/templates/guests/openbsd/network_static.erb +1 -0
- data/templates/guests/suse/network_dhcp.erb +6 -0
- data/templates/guests/suse/network_static.erb +10 -0
- data/templates/locales/en.yml +123 -13
- data/templates/nfs/exports.erb +4 -4
- data/templates/nfs/exports_freebsd.erb +4 -4
- data/templates/nfs/exports_linux.erb +5 -3
- data/templates/provisioners/chef_client/client.erb +9 -0
- data/templates/provisioners/chef_solo/solo.erb +19 -1
- data/test/unit/vagrant/action/builtin/graceful_halt_test.rb +1 -2
- data/test/unit/vagrant/cli_test.rb +1 -0
- data/test/unit/vagrant/config/v2/root_test.rb +18 -0
- data/test/unit/vagrant/environment_test.rb +25 -0
- data/test/unit/vagrant/util/downloader_test.rb +4 -4
- data/test/unit/vagrant_test.rb +18 -0
- data/website/docs/.buildpacks +2 -0
- data/website/docs/Gemfile +13 -0
- data/website/docs/Gemfile.lock +141 -0
- data/website/docs/Procfile +1 -0
- data/website/docs/README.md +26 -0
- data/website/docs/config.rb +78 -0
- data/website/docs/config.ru +44 -0
- data/website/docs/helpers/sidebar_helpers.rb +19 -0
- data/website/docs/lib/redirect_to_latest.rb +25 -0
- data/website/docs/lib/redirect_v1_docs.rb +26 -0
- data/website/docs/source/404.html.erb +7 -0
- data/website/docs/source/images/bullet_1.png +0 -0
- data/website/docs/source/images/bullet_2.png +0 -0
- data/website/docs/source/images/bullet_3.png +0 -0
- data/website/docs/source/images/customers.png +0 -0
- data/website/docs/source/images/customers_small.png +0 -0
- data/website/docs/source/images/footer_background.png +0 -0
- data/website/docs/source/images/footer_hashi_logo.png +0 -0
- data/website/docs/source/images/footer_vagrant_logo.png +0 -0
- data/website/docs/source/images/get_started_background.png +0 -0
- data/website/docs/source/images/icon_caution.png +0 -0
- data/website/docs/source/images/logo_docs.png +0 -0
- data/website/docs/source/images/logo_docs_small.png +0 -0
- data/website/docs/source/images/logo_small.png +0 -0
- data/website/docs/source/images/logo_vagrant.png +0 -0
- data/website/docs/source/images/open_close.png +0 -0
- data/website/docs/source/images/search_icon.png +0 -0
- data/website/docs/source/images/sidebar_background_docs.png +0 -0
- data/website/docs/source/images/sidebar_background_inner.png +0 -0
- data/website/docs/source/images/steps_background.png +0 -0
- data/website/docs/source/images/vagrant_header_background.png +0 -0
- data/website/docs/source/index.html.erb +0 -0
- data/website/docs/source/javascripts/backstretch.js +4 -0
- data/website/docs/source/javascripts/bootstrap.min.js +7 -0
- data/website/docs/source/javascripts/fittext.js +43 -0
- data/website/docs/source/javascripts/grid-overlay.js +161 -0
- data/website/docs/source/javascripts/jquery.js +2 -0
- data/website/docs/source/javascripts/less-1.3.0.min.js +9 -0
- data/website/docs/source/javascripts/modernizr.js +1384 -0
- data/website/docs/source/javascripts/vagrantup.js +15 -0
- data/website/docs/source/layouts/layout.erb +266 -0
- data/website/docs/source/stylesheets/_base.less +317 -0
- data/website/docs/source/stylesheets/_components.less +74 -0
- data/website/docs/source/stylesheets/_footer.less +101 -0
- data/website/docs/source/stylesheets/_media-queries.less +452 -0
- data/website/docs/source/stylesheets/_mixins.less +174 -0
- data/website/docs/source/stylesheets/_nav.less +71 -0
- data/website/docs/source/stylesheets/_pages.less +276 -0
- data/website/docs/source/stylesheets/_sidebar.less +136 -0
- data/website/docs/source/stylesheets/_type.less +36 -0
- data/website/docs/source/stylesheets/_variables.less +39 -0
- data/website/docs/source/stylesheets/bootstrap.css +5946 -0
- data/website/docs/source/stylesheets/vagrantup.less +16 -0
- data/website/docs/source/v2/boxes.html.md +78 -0
- data/website/docs/source/v2/boxes/format.html.md +32 -0
- data/website/docs/source/v2/cli/box.html.md +62 -0
- data/website/docs/source/v2/cli/destroy.html.md +20 -0
- data/website/docs/source/v2/cli/halt.html.md +19 -0
- data/website/docs/source/v2/cli/index.html.md +24 -0
- data/website/docs/source/v2/cli/init.html.md +18 -0
- data/website/docs/source/v2/cli/package.html.md +43 -0
- data/website/docs/source/v2/cli/plugin.html.md +56 -0
- data/website/docs/source/v2/cli/provision.html.md +24 -0
- data/website/docs/source/v2/cli/reload.html.md +27 -0
- data/website/docs/source/v2/cli/resume.html.md +11 -0
- data/website/docs/source/v2/cli/ssh.html.md +24 -0
- data/website/docs/source/v2/cli/ssh_config.html.md +16 -0
- data/website/docs/source/v2/cli/status.html.md +14 -0
- data/website/docs/source/v2/cli/suspend.html.md +19 -0
- data/website/docs/source/v2/cli/up.html.md +34 -0
- data/website/docs/source/v2/debugging.html.md +42 -0
- data/website/docs/source/v2/getting-started/boxes.html.md +56 -0
- data/website/docs/source/v2/getting-started/index.html.md +43 -0
- data/website/docs/source/v2/getting-started/networking.html.md +45 -0
- data/website/docs/source/v2/getting-started/project_setup.html.md +38 -0
- data/website/docs/source/v2/getting-started/providers.html.md +37 -0
- data/website/docs/source/v2/getting-started/provisioning.html.md +75 -0
- data/website/docs/source/v2/getting-started/rebuild.html.md +17 -0
- data/website/docs/source/v2/getting-started/synced_folders.html.md +42 -0
- data/website/docs/source/v2/getting-started/teardown.html.md +41 -0
- data/website/docs/source/v2/getting-started/up.html.md +35 -0
- data/website/docs/source/v2/index.html.md +10 -0
- data/website/docs/source/v2/installation/backwards-compatibility.html.md +35 -0
- data/website/docs/source/v2/installation/index.html.md +28 -0
- data/website/docs/source/v2/installation/uninstallation.html.md +39 -0
- data/website/docs/source/v2/installation/upgrading-from-1-0.html.md +26 -0
- data/website/docs/source/v2/installation/upgrading.html.md +20 -0
- data/website/docs/source/v2/multi-machine/index.html.md +105 -0
- data/website/docs/source/v2/networking/basic_usage.html.md +43 -0
- data/website/docs/source/v2/networking/forwarded_ports.html.md +57 -0
- data/website/docs/source/v2/networking/index.html.md +40 -0
- data/website/docs/source/v2/networking/private_network.html.md +48 -0
- data/website/docs/source/v2/networking/public_network.html.md +53 -0
- data/website/docs/source/v2/plugins/commands.html.md +116 -0
- data/website/docs/source/v2/plugins/configuration.html.md +166 -0
- data/website/docs/source/v2/plugins/development-basics.html.md +139 -0
- data/website/docs/source/v2/plugins/guest-capabilities.html.md +100 -0
- data/website/docs/source/v2/plugins/guests.html.md +99 -0
- data/website/docs/source/v2/plugins/hosts.html.md +46 -0
- data/website/docs/source/v2/plugins/index.html.md +21 -0
- data/website/docs/source/v2/plugins/packaging.html.md +102 -0
- data/website/docs/source/v2/plugins/providers.html.md +234 -0
- data/website/docs/source/v2/plugins/provisioners.html.md +64 -0
- data/website/docs/source/v2/plugins/usage.html.md +58 -0
- data/website/docs/source/v2/providers/basic_usage.html.md +67 -0
- data/website/docs/source/v2/providers/configuration.html.md +89 -0
- data/website/docs/source/v2/providers/custom.html.md +9 -0
- data/website/docs/source/v2/providers/default.html.md +22 -0
- data/website/docs/source/v2/providers/index.html.md +23 -0
- data/website/docs/source/v2/providers/installation.html.md +11 -0
- data/website/docs/source/v2/provisioning/ansible.html.md +144 -0
- data/website/docs/source/v2/provisioning/basic_usage.html.md +67 -0
- data/website/docs/source/v2/provisioning/chef_client.html.md +109 -0
- data/website/docs/source/v2/provisioning/chef_solo.html.md +156 -0
- data/website/docs/source/v2/provisioning/index.html.md +28 -0
- data/website/docs/source/v2/provisioning/puppet_agent.html.md +70 -0
- data/website/docs/source/v2/provisioning/puppet_apply.html.md +114 -0
- data/website/docs/source/v2/provisioning/shell.html.md +88 -0
- data/website/docs/source/v2/synced-folders/basic_usage.html.md +53 -0
- data/website/docs/source/v2/synced-folders/index.html.md +17 -0
- data/website/docs/source/v2/synced-folders/nfs.html.md +53 -0
- data/website/docs/source/v2/vagrantfile/index.html.md +75 -0
- data/website/docs/source/v2/vagrantfile/machine_settings.html.md +84 -0
- data/website/docs/source/v2/vagrantfile/ssh_settings.html.md +61 -0
- data/website/docs/source/v2/vagrantfile/vagrant_settings.html.md +19 -0
- data/website/docs/source/v2/vagrantfile/version.html.md +64 -0
- data/website/docs/source/v2/virtualbox/boxes.html.md +71 -0
- data/website/docs/source/v2/virtualbox/configuration.html.md +63 -0
- data/website/docs/source/v2/virtualbox/index.html.md +21 -0
- data/website/docs/source/v2/virtualbox/usage.html.md +12 -0
- data/website/docs/source/v2/vmware/boxes.html.md +107 -0
- data/website/docs/source/v2/vmware/configuration.html.md +91 -0
- data/website/docs/source/v2/vmware/index.html.md +30 -0
- data/website/docs/source/v2/vmware/installation.html.md +40 -0
- data/website/docs/source/v2/vmware/known-issues.html.md +21 -0
- data/website/docs/source/v2/vmware/usage.html.md +27 -0
- data/website/docs/source/v2/why-vagrant/index.html.md +46 -0
- data/website/www/.buildpacks +2 -0
- data/website/www/Gemfile +15 -0
- data/website/www/Gemfile.lock +123 -0
- data/website/www/Procfile +1 -0
- data/website/www/README.md +26 -0
- data/website/www/config.rb +88 -0
- data/website/www/config.ru +39 -0
- data/website/www/helpers/sidebar_helpers.rb +12 -0
- data/website/www/lib/legacy_redirect.rb +32 -0
- data/website/www/source/404.html.erb +11 -0
- data/website/www/source/_sidebar_about.erb +5 -0
- data/website/www/source/_sidebar_blog.erb +11 -0
- data/website/www/source/_sidebar_support.html.erb +6 -0
- data/website/www/source/about.html.markdown +16 -0
- data/website/www/source/blog.html.erb +34 -0
- data/website/www/source/blog/2013-09-16-test.html.markdown +26 -0
- data/website/www/source/blog_feed.xml.builder +23 -0
- data/website/www/source/images/bullet_1.png +0 -0
- data/website/www/source/images/bullet_2.png +0 -0
- data/website/www/source/images/bullet_3.png +0 -0
- data/website/www/source/images/customers.png +0 -0
- data/website/www/source/images/customers_small.png +0 -0
- data/website/www/source/images/footer_background.png +0 -0
- data/website/www/source/images/footer_hashi_logo.png +0 -0
- data/website/www/source/images/footer_vagrant_logo.png +0 -0
- data/website/www/source/images/get_started_background.png +0 -0
- data/website/www/source/images/icon_caution.png +0 -0
- data/website/www/source/images/logo_docs.png +0 -0
- data/website/www/source/images/logo_docs_small.png +0 -0
- data/website/www/source/images/logo_small.png +0 -0
- data/website/www/source/images/logo_vagrant.png +0 -0
- data/website/www/source/images/open_close.png +0 -0
- data/website/www/source/images/search_icon.png +0 -0
- data/website/www/source/images/sidebar_background_docs.png +0 -0
- data/website/www/source/images/sidebar_background_inner.png +0 -0
- data/website/www/source/images/sponsors/fastly.png +0 -0
- data/website/www/source/images/sponsors/kiip.png +0 -0
- data/website/www/source/images/sponsors/softlayer.jpg +0 -0
- data/website/www/source/images/sponsors/typekit.png +0 -0
- data/website/www/source/images/steps_background.png +0 -0
- data/website/www/source/images/vagrant_header_background.png +0 -0
- data/website/www/source/images/vagrant_vmware_background.png +0 -0
- data/website/www/source/index.html.erb +109 -0
- data/website/www/source/javascripts/backstretch.js +4 -0
- data/website/www/source/javascripts/bootstrap.min.js +7 -0
- data/website/www/source/javascripts/fittext.js +43 -0
- data/website/www/source/javascripts/grid-overlay.js +161 -0
- data/website/www/source/javascripts/jquery.js +2 -0
- data/website/www/source/javascripts/less-1.3.0.min.js +9 -0
- data/website/www/source/javascripts/modernizr.js +1384 -0
- data/website/www/source/javascripts/vagrantup.js +58 -0
- data/website/www/source/layouts/blog_post.erb +42 -0
- data/website/www/source/layouts/inner.erb +34 -0
- data/website/www/source/layouts/layout.erb +107 -0
- data/website/www/source/sponsors.html.erb +23 -0
- data/website/www/source/stylesheets/_base.less +326 -0
- data/website/www/source/stylesheets/_components.less +74 -0
- data/website/www/source/stylesheets/_footer.less +101 -0
- data/website/www/source/stylesheets/_media-queries.less +549 -0
- data/website/www/source/stylesheets/_mixins.less +175 -0
- data/website/www/source/stylesheets/_modules.less +37 -0
- data/website/www/source/stylesheets/_nav.less +74 -0
- data/website/www/source/stylesheets/_pages.less +467 -0
- data/website/www/source/stylesheets/_sidebar.less +137 -0
- data/website/www/source/stylesheets/_type.less +36 -0
- data/website/www/source/stylesheets/_variables.less +39 -0
- data/website/www/source/stylesheets/bootstrap.css +5946 -0
- data/website/www/source/stylesheets/vagrantup.less +17 -0
- data/website/www/source/support.html.erb +25 -0
- data/website/www/source/support/community.html.erb +28 -0
- data/website/www/source/support/professional.html.erb +17 -0
- data/website/www/source/vmware/eula.html.md +21 -0
- data/website/www/source/vmware/index.html.erb +185 -0
- data/website/www/source/vmware/privacy-policy.html.md +71 -0
- data/website/www/source/vmware/terms-of-service.html.md +50 -0
- metadata +436 -186
@@ -0,0 +1,22 @@
|
|
1
|
+
---
|
2
|
+
page_title: "Default Provider - Providers"
|
3
|
+
sidebar_current: "providers-default"
|
4
|
+
---
|
5
|
+
|
6
|
+
# Default Provider
|
7
|
+
|
8
|
+
By default, VirtualBox is the default provider for Vagrant. VirtualBox is
|
9
|
+
still the most accessible platform to use Vagrant: it is free, cross-platform,
|
10
|
+
and has been supported by Vagrant for years. With VirtualBox as the default
|
11
|
+
provider, it provides the lowest friction for new users to get started with
|
12
|
+
Vagrant.
|
13
|
+
|
14
|
+
However, you may find after using Vagrant for some time that you prefer
|
15
|
+
to use another provider as your default. In fact, this is quite common.
|
16
|
+
To make this experience better, Vagrant allows specifying the default
|
17
|
+
provider to use by setting the `VAGRANT_DEFAULT_PROVIDER` environmental
|
18
|
+
variable.
|
19
|
+
|
20
|
+
Just set `VAGRANT_DEFAULT_PROVIDER` to the provider you wish to be the
|
21
|
+
default. For example, if you use Vagrant with VMware Fusion, you can set
|
22
|
+
the environmental variable to `vmware_fusion` and it will be your default.
|
@@ -0,0 +1,23 @@
|
|
1
|
+
---
|
2
|
+
page_title: "Providers"
|
3
|
+
sidebar_current: "providers"
|
4
|
+
---
|
5
|
+
|
6
|
+
# Providers
|
7
|
+
|
8
|
+
While Vagrant ships out of the box with support for [VirtualBox](http://www.virtualbox.org),
|
9
|
+
Vagrant has the ability to manage other types of machines as well. This is done
|
10
|
+
by using other _providers_ with Vagrant.
|
11
|
+
|
12
|
+
Alternate providers can offer different features that make more sense in your use case.
|
13
|
+
For example, if you're using Vagrant for any real work, [VMware](http://www.vmware.com)
|
14
|
+
providers are recommended since they're well supported and generally more
|
15
|
+
stable and performant than VirtualBox.
|
16
|
+
|
17
|
+
Before you can use another provider, you must install it. Vagrant only ships
|
18
|
+
with VirtualBox support. Installation of other providers is done via the
|
19
|
+
Vagrant plugin system.
|
20
|
+
|
21
|
+
Once the provider is installed, usage is straightforward and simple, as
|
22
|
+
you would expect with Vagrant. Read into the relevant subsections found in
|
23
|
+
the navigation to the left for more information.
|
@@ -0,0 +1,11 @@
|
|
1
|
+
---
|
2
|
+
page_title: "Installation - Providers"
|
3
|
+
sidebar_current: "providers-installation"
|
4
|
+
---
|
5
|
+
|
6
|
+
# Provider Installation
|
7
|
+
|
8
|
+
Providers are distributed as Vagrant plugins, and are therefore installed
|
9
|
+
using [standard plugin installation steps](/v2/plugins/usage.html). After
|
10
|
+
installing a plugin which contains a provider, the provider should
|
11
|
+
immediately be available.
|
@@ -0,0 +1,144 @@
|
|
1
|
+
---
|
2
|
+
page_title: "Ansible - Provisioning"
|
3
|
+
sidebar_current: "provisioning-ansible"
|
4
|
+
---
|
5
|
+
|
6
|
+
# Ansible Provisioner
|
7
|
+
|
8
|
+
**Provisioner name: `"ansible"`**
|
9
|
+
|
10
|
+
The ansible provisioner allows you to provision the guest using
|
11
|
+
[Ansible](http://ansible.cc) playbooks.
|
12
|
+
|
13
|
+
Ansible playbooks are [YAML](http://en.wikipedia.org/wiki/YAML) documents that
|
14
|
+
comprise the set of steps to be orchestrated on one or more machines. This documentation
|
15
|
+
page will not go into how to use Ansible or how to write Ansible playbooks, since Ansible
|
16
|
+
is a complete deployment and configuration management system that is beyond the scope of
|
17
|
+
a single page of documentation.
|
18
|
+
|
19
|
+
<div class="alert alert-warn">
|
20
|
+
<p>
|
21
|
+
<strong>Warning:</strong> If you're not familiar with Ansible and Vagrant already,
|
22
|
+
I recommend starting with the <a href="/v2/provisioning/shell.html">shell
|
23
|
+
provisioner</a>. However, if you're comfortable with Vagrant already, Vagrant
|
24
|
+
is a great way to learn Ansible.
|
25
|
+
</p>
|
26
|
+
</div>
|
27
|
+
|
28
|
+
## Inventory File
|
29
|
+
|
30
|
+
When using Ansible, it needs to know on which machines a given playbook should run. It does
|
31
|
+
this by way of an inventory file which lists those machines. In the context of Vagrant,
|
32
|
+
there are two ways to approach working with inventory files. The first and simplest option
|
33
|
+
is to not provide one to Vagrant at all. Vagrant will generate inventory files for each
|
34
|
+
virtual machine it manages, and use them for provisioning machines. Generated inventory files
|
35
|
+
are created adjacent to your Vagrantfile, named using the machine names set in your Vagrantfile.
|
36
|
+
|
37
|
+
The second option is for situations where you'd like to have more than one virtual machine
|
38
|
+
in a single inventory file, perhaps leveraging more complex playbooks or inventory grouping.
|
39
|
+
If you provide the `ansible.inventory_path` option referencing a specific inventory file
|
40
|
+
dedicated to your Vagrant project, that one will be used instead of generating them.
|
41
|
+
Such an inventory file for use with Vagrant might look like:
|
42
|
+
|
43
|
+
```
|
44
|
+
[vagrant]
|
45
|
+
192.168.111.222
|
46
|
+
```
|
47
|
+
|
48
|
+
Where the above IP address is one set in your Vagrantfile:
|
49
|
+
|
50
|
+
```
|
51
|
+
config.vm.network :private_network, ip: "192.168.111.222"
|
52
|
+
```
|
53
|
+
|
54
|
+
## Playbook
|
55
|
+
|
56
|
+
The second component of a successful Ansible provisioner setup is the Ansible playbook
|
57
|
+
which contains the steps that should be run on the guest. Ansible's
|
58
|
+
[playbook documentation](http://ansible.cc/docs/playbooks.html) goes into great
|
59
|
+
detail on how to author playbooks, and there are a number of
|
60
|
+
[best practices](http://ansible.cc/docs/bestpractices.html) that can be applied to use
|
61
|
+
Ansible's powerful features effectively. A playbook that installs and starts (or restarts
|
62
|
+
if it was updated) the NTP daemon via YUM looks like:
|
63
|
+
|
64
|
+
```
|
65
|
+
---
|
66
|
+
- hosts: all
|
67
|
+
tasks:
|
68
|
+
- name: ensure ntpd is at the latest version
|
69
|
+
yum: pkg=ntp state=latest
|
70
|
+
notify:
|
71
|
+
- restart ntpd
|
72
|
+
handlers:
|
73
|
+
- name: restart ntpd
|
74
|
+
service: name=ntpd state=restarted
|
75
|
+
```
|
76
|
+
|
77
|
+
You can of course target other operating systems that don't have YUM by changing the
|
78
|
+
playbook tasks. Ansible ships with a number of [modules](http://ansible.cc/docs/modules.html)
|
79
|
+
that make running otherwise tedious tasks dead simple.
|
80
|
+
|
81
|
+
## Running Ansible
|
82
|
+
|
83
|
+
To run Ansible against your Vagrant guest, the basic Vagrantfile configuration looks like:
|
84
|
+
|
85
|
+
```ruby
|
86
|
+
Vagrant.configure("2") do |config|
|
87
|
+
config.vm.provision "ansible" do |ansible|
|
88
|
+
ansible.playbook = "playbook.yml"
|
89
|
+
end
|
90
|
+
end
|
91
|
+
```
|
92
|
+
|
93
|
+
This causes Vagrant to run the `playbook.yml` playbook against all hosts in the inventory file.
|
94
|
+
Since an Ansible playbook can include many files, you may also collect the related files in
|
95
|
+
a directory structure like this:
|
96
|
+
|
97
|
+
```
|
98
|
+
$ tree
|
99
|
+
.
|
100
|
+
|-- Vagrantfile
|
101
|
+
|-- provisioning
|
102
|
+
| |-- group_vars
|
103
|
+
| |-- all
|
104
|
+
| |-- playbook.yml
|
105
|
+
```
|
106
|
+
|
107
|
+
In such an arrangement, the `ansible.playbook` path should be adjusted accordingly:
|
108
|
+
|
109
|
+
```ruby
|
110
|
+
Vagrant.configure("2") do |config|
|
111
|
+
config.vm.provision "ansible" do |ansible|
|
112
|
+
ansible.playbook = "provisioning/playbook.yml"
|
113
|
+
end
|
114
|
+
end
|
115
|
+
```
|
116
|
+
|
117
|
+
## Additional Options
|
118
|
+
|
119
|
+
The Ansible provisioner also includes a number of additional options that can be set,
|
120
|
+
all of which get passed to the `ansible-playbook` command that ships with Ansible.
|
121
|
+
|
122
|
+
* `ansible.extra_vars` can be used to pass a hash of additional variables to the playbook. For example:
|
123
|
+
```
|
124
|
+
ansible.extra_vars = {
|
125
|
+
ntp_server: "pool.ntp.org",
|
126
|
+
nginx_workers: 4
|
127
|
+
}
|
128
|
+
```
|
129
|
+
These variables take the highest precedence over any other variables.
|
130
|
+
* `ansible.sudo` can be set to `true` to cause Ansible to perform commands using sudo.
|
131
|
+
* `ansible.sudo_user` can be set to a string containing a username on the guest who should be used
|
132
|
+
by the sudo command.
|
133
|
+
* `ansible.ask_sudo_pass` can be set to `true` to require Ansible to prompt for a sudo password.
|
134
|
+
* `ansible.limit` can be set to a string or an array of machines or groups from the inventory file to further narrow down which hosts are affected.
|
135
|
+
* `ansible.verbose` can be set to increase Ansible's verbosity to obtain full detailed logging. By default, Vagrant uses Ansible default verbosity (`--verbose` or `-v`). By enabling this option following higher verbosity can be activated:
|
136
|
+
* `'vv'`
|
137
|
+
* `'vvv'`, also aliased as `'extra'`
|
138
|
+
* `ansible.tags` can be set to a string or an array of tags. Only plays, roles and tasks tagged with these values will be executed.
|
139
|
+
* `ansible.skip_tags` can be set to a string or an array of tags. Only plays, roles and tasks that *do not match* these values will be executed.
|
140
|
+
* `ansible.start_at_task` can be set to a string corresponding to the task name where the playbook provision will start.
|
141
|
+
* `ansible.raw_arguments` is an *unsafe wildcard* string that can be used to take advantage of `ansible-playbook` arguments that are not (yet) supported by this Vagrant provisioner plugin. This can be very useful when integrating with bleeding edge Ansible versions. Following precedence rules apply:
|
142
|
+
* Any supported options (described above) will override conflicting `raw_arguments` value (e.g. `--tags` or `--start-at-task`)
|
143
|
+
* Vagrant default user authentication can be overridden via `raw_arguments` (with custom values for `--user` and `--private-key`)
|
144
|
+
* `ansible.host_key_checking` can be set to `false` which will disable host key checking and prevent `"FAILED: (25, 'Inappropriate ioctl for device')"` errors from being reported during provisioner runs. The default value is `true`, which matches the default behavior of Ansible 1.2.1 and later.
|
@@ -0,0 +1,67 @@
|
|
1
|
+
---
|
2
|
+
page_title: "Basic Usage - Provisioning"
|
3
|
+
sidebar_current: "provisioning-basic"
|
4
|
+
---
|
5
|
+
|
6
|
+
# Basic Usage of Provisioners
|
7
|
+
|
8
|
+
While Vagrant offers multiple options for how you are able to provision
|
9
|
+
your machine, there is a standard usage pattern as well as some important
|
10
|
+
points common to all provisioners that are important to know.
|
11
|
+
|
12
|
+
## Configuration
|
13
|
+
|
14
|
+
First, every provisioner is configured within your [Vagrantfile](/v2/vagrantfile/index.html)
|
15
|
+
using the `config.vm.provision` method call. For example, the Vagrantfile
|
16
|
+
below enables shell provisioning:
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
Vagrant.configure("2") do |config|
|
20
|
+
# ... other configuration
|
21
|
+
|
22
|
+
config.vm.provision "shell", inline: "echo hello"
|
23
|
+
end
|
24
|
+
```
|
25
|
+
|
26
|
+
Every provisioner has an identifier, such as `"shell", used as the first
|
27
|
+
parameter to the provisioning configuration. Following that is basic key/value
|
28
|
+
for configuring that specific provisioner. Instead of basic key/value, you
|
29
|
+
can also use a Ruby block for a syntax that is more like variable assignment.
|
30
|
+
The following is effectively the same as the prior example:
|
31
|
+
|
32
|
+
```ruby
|
33
|
+
Vagrant.configure("2") do |config|
|
34
|
+
# ... other configuration
|
35
|
+
|
36
|
+
config.vm.provision "shell" do |s|
|
37
|
+
s.inline = "echo hello"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
```
|
41
|
+
|
42
|
+
The benefit of the block-based syntax is that with more than a couple options
|
43
|
+
it can greatly improve readability. Additionally, some provisioners, like
|
44
|
+
the Chef provisioner, have special methods that can be called within that
|
45
|
+
block to ease configuration that can't be done with the key/value approach.
|
46
|
+
|
47
|
+
## Multiple Provisioners
|
48
|
+
|
49
|
+
Multiple `config.vm.provision` methods can be used to define multiple
|
50
|
+
provisioners. These provisioners will be run in the order they're defined.
|
51
|
+
This is useful for a variety of reasons, but most commonly it is used so
|
52
|
+
that a shell script can bootstrap some of the system so that another provisioner
|
53
|
+
can take over later.
|
54
|
+
|
55
|
+
## Running Provisioners
|
56
|
+
|
57
|
+
Provisioners are run in three cases: `vagrant up`, `vagrant reload`, and
|
58
|
+
`vagrant provision`.
|
59
|
+
|
60
|
+
A `--no-provision` flag can be passed to `up` and `reload` if you don't
|
61
|
+
want to run provisioners. Likewise, you can pass `--provision` to force
|
62
|
+
provisioning.
|
63
|
+
|
64
|
+
The `--provision-with` flag can be used if you only want to run a
|
65
|
+
specific provisioner if you have multiple provisioners specified. For
|
66
|
+
example, if you have a shell and Puppet provisioner and only want to
|
67
|
+
run the shell one, you can do `vagrant provision --provision-with shell`.
|
@@ -0,0 +1,109 @@
|
|
1
|
+
---
|
2
|
+
page_title: "Chef Client - Provisioning"
|
3
|
+
sidebar_current: "provisioning-chefclient"
|
4
|
+
---
|
5
|
+
|
6
|
+
# Chef Client Provisioner
|
7
|
+
|
8
|
+
**Provisioner name: `chef_client`**
|
9
|
+
|
10
|
+
The chef client provisioner allows you to provision the guest using
|
11
|
+
[Chef](http://www.opscode.com/chef/), specifically by connecting
|
12
|
+
to an existing Chef Server and registering the Vagrant machine as a
|
13
|
+
node within your infrastructure.
|
14
|
+
|
15
|
+
If you're just learning Chef for the first time, you probably want
|
16
|
+
to start with the [Chef Solo](/v2/provisioning/chef_solo.html)
|
17
|
+
provisioner.
|
18
|
+
|
19
|
+
<div class="alert alert-warn">
|
20
|
+
<p>
|
21
|
+
<strong>Warning:</strong> If you're not familiar with Chef and Vagrant already,
|
22
|
+
I recommend starting with the <a href="/v2/provisioning/shell.html">shell
|
23
|
+
provisioner</a>.
|
24
|
+
</p>
|
25
|
+
</div>
|
26
|
+
|
27
|
+
## Authenticating
|
28
|
+
|
29
|
+
The minimum required to use provision using Chef client is to provide
|
30
|
+
a URL to the Chef sever as well as the path to the validation key so
|
31
|
+
that the node can register with the Chef server:
|
32
|
+
|
33
|
+
```ruby
|
34
|
+
Vagrant.configure("2") do |config|
|
35
|
+
config.vm.provision "chef_client" do |chef|
|
36
|
+
chef.chef_server_url = "http://mychefserver.com:4000/"
|
37
|
+
chef.validation_key_path = "validation.pem"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
```
|
41
|
+
|
42
|
+
The node will register with the Chef server specified, download the
|
43
|
+
proper run list for that node, and provision.
|
44
|
+
|
45
|
+
## Specifying a Run List
|
46
|
+
|
47
|
+
Normally, the Chef server is responsible for specifying the run list
|
48
|
+
for the node. However, you can override what the Chef server sends
|
49
|
+
down by manually specifying a run list:
|
50
|
+
|
51
|
+
```ruby
|
52
|
+
Vagrant.configure("2") do |config|
|
53
|
+
config.vm.provision "chef_client" do |chef|
|
54
|
+
# Add a recipe
|
55
|
+
chef.add_recipe "apache"
|
56
|
+
|
57
|
+
# Or maybe a role
|
58
|
+
chef.add_role "web"
|
59
|
+
end
|
60
|
+
end
|
61
|
+
```
|
62
|
+
|
63
|
+
Remember, this will _override_ the run list specified on the Chef
|
64
|
+
server itself.
|
65
|
+
|
66
|
+
## Environments
|
67
|
+
|
68
|
+
You can specify the [environment](http://wiki.opscode.com/display/chef/Environments)
|
69
|
+
for the node to come up in using the `environment` configuration option:
|
70
|
+
|
71
|
+
```ruby
|
72
|
+
Vagrant.configure("2") do |config|
|
73
|
+
config.vm.provision "chef_client" do |chef|
|
74
|
+
# ...
|
75
|
+
|
76
|
+
chef.environment = "development"
|
77
|
+
end
|
78
|
+
end
|
79
|
+
```
|
80
|
+
|
81
|
+
## Other Configuration Options
|
82
|
+
|
83
|
+
There are a few more configuration options available. These generally don't
|
84
|
+
need to be modified but are available if your Chef server requires customization
|
85
|
+
of these variables:
|
86
|
+
|
87
|
+
* `client_key_path`
|
88
|
+
* `node_name`
|
89
|
+
* `validation_client_name`
|
90
|
+
|
91
|
+
## Cleanup
|
92
|
+
|
93
|
+
When you provision your Vagrant virtual machine with Chef server, it creates a
|
94
|
+
new Chef "node" entry and Chef "client" entry on the Chef server, using the
|
95
|
+
hostname of the machine. After you tear down your guest machine, you must
|
96
|
+
explicitly delete these entries from the Chef server before you provision
|
97
|
+
a new one with Chef server. For example, using Chef's built-in `knife` tool:
|
98
|
+
|
99
|
+
```
|
100
|
+
$ knife node delete precise64
|
101
|
+
$ knife client delete precise64
|
102
|
+
```
|
103
|
+
|
104
|
+
If you fail to do so, you'll get the following error when Vagrant
|
105
|
+
tries to provision the machine with Chef client:
|
106
|
+
|
107
|
+
```
|
108
|
+
HTTP Request Returned 409 Conflict: Client already exists.
|
109
|
+
```
|
@@ -0,0 +1,156 @@
|
|
1
|
+
---
|
2
|
+
page_title: "Chef Solo - Provisioning"
|
3
|
+
sidebar_current: "provisioning-chefsolo"
|
4
|
+
---
|
5
|
+
|
6
|
+
# Chef Solo Provisioner
|
7
|
+
|
8
|
+
**Provisioner name: `chef_solo`**
|
9
|
+
|
10
|
+
The chef solo provisioner allows you to provision the guest using
|
11
|
+
[Chef](http://www.opscode.com/chef/), specifically with
|
12
|
+
[Chef Solo](http://docs.opscode.com/chef_solo.html).
|
13
|
+
|
14
|
+
Chef solo is ideal for people who are already experienced with Chef,
|
15
|
+
already have Chef cookbooks, or are looking to learn Chef. Specifically,
|
16
|
+
this documentation page will not go into how to use Chef or how to write
|
17
|
+
Chef cookbooks, since Chef is a complete system that is beyond the scope
|
18
|
+
of a single page of documentation.
|
19
|
+
|
20
|
+
<div class="alert alert-warn">
|
21
|
+
<p>
|
22
|
+
<strong>Warning:</strong> If you're not familiar with Chef and Vagrant already,
|
23
|
+
I recommend starting with the <a href="/v2/provisioning/shell.html">shell
|
24
|
+
provisioner</a>. However, if you're comfortable with Vagrant already, Vagrant
|
25
|
+
is the best way to learn Chef.
|
26
|
+
</p>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
|
30
|
+
## Specifying a Run List
|
31
|
+
|
32
|
+
The easiest way to get started with the Chef Solo provisioner is to just
|
33
|
+
specify a [run list](http://docs.opscode.com/essentials_node_object_run_lists.html). This looks like:
|
34
|
+
|
35
|
+
```ruby
|
36
|
+
Vagrant.configure("2") do |config|
|
37
|
+
config.vm.provision "chef_solo" do |chef|
|
38
|
+
chef.add_recipe "apache"
|
39
|
+
end
|
40
|
+
end
|
41
|
+
```
|
42
|
+
|
43
|
+
This causes Vagrant to run Chef Solo with the "apache" cookbook. The cookbooks
|
44
|
+
by default are looked for in the "cookbooks" directory relative to your
|
45
|
+
project root. The directory structure ends up looking like this:
|
46
|
+
|
47
|
+
```
|
48
|
+
$ tree
|
49
|
+
.
|
50
|
+
|-- Vagrantfile
|
51
|
+
|-- cookbooks
|
52
|
+
| |-- apache
|
53
|
+
| |-- recipes
|
54
|
+
| |-- default.rb
|
55
|
+
```
|
56
|
+
|
57
|
+
## Custom Cookbooks Path
|
58
|
+
|
59
|
+
Instead of using the default "cookbooks" directory, a custom cookbooks
|
60
|
+
path can also be set via the `cookbooks_path` configuration directive:
|
61
|
+
|
62
|
+
```ruby
|
63
|
+
Vagrant.configure("2") do |config|
|
64
|
+
config.vm.provision "chef_solo" do |chef|
|
65
|
+
chef.cookbooks_path = "my_cookbooks"
|
66
|
+
end
|
67
|
+
end
|
68
|
+
```
|
69
|
+
|
70
|
+
The path can be relative or absolute. If it is relative, it is relative
|
71
|
+
to the project root.
|
72
|
+
|
73
|
+
The configuration value can also be an array of paths:
|
74
|
+
|
75
|
+
```ruby
|
76
|
+
Vagrant.configure("2") do |config|
|
77
|
+
config.vm.provision "chef_solo" do |chef|
|
78
|
+
chef.cookbooks_path = ["cookbooks", "my_cookbooks"]
|
79
|
+
end
|
80
|
+
end
|
81
|
+
```
|
82
|
+
|
83
|
+
## Roles
|
84
|
+
|
85
|
+
Vagrant also supports provisioning with [Chef roles](http://docs.opscode.com/essentials_roles.html).
|
86
|
+
This is done by specifying a path to a roles folder where roles are defined
|
87
|
+
and by adding roles to your run list:
|
88
|
+
|
89
|
+
```ruby
|
90
|
+
Vagrant.configure("2") do |config|
|
91
|
+
config.vm.provision "chef_solo" do |chef|
|
92
|
+
chef.roles_path = "roles"
|
93
|
+
chef.add_role("web")
|
94
|
+
end
|
95
|
+
end
|
96
|
+
```
|
97
|
+
|
98
|
+
Just like the cookbooks path, the roles path is relative to the project
|
99
|
+
root if a relative path is given.
|
100
|
+
|
101
|
+
**Note:** The name of the role file must be the same as the role name.
|
102
|
+
For example the `web` role must be in the `roles_path` as web.json or web.rb.
|
103
|
+
This is required by Chef itself, and isn't a limitation imposed by
|
104
|
+
Vagrant.
|
105
|
+
|
106
|
+
## Data Bags
|
107
|
+
|
108
|
+
[Data bags](http://docs.opscode.com/essentials_data_bags.html) are also
|
109
|
+
supported by the Chef Solo provisioner. This is done by specifying
|
110
|
+
a path to your data bags directory:
|
111
|
+
|
112
|
+
```ruby
|
113
|
+
Vagrant.configure("2") do |config|
|
114
|
+
config.vm.provision "chef_solo" do |chef|
|
115
|
+
chef.data_bags_path = "data_bags"
|
116
|
+
end
|
117
|
+
end
|
118
|
+
```
|
119
|
+
|
120
|
+
## Custom JSON Data
|
121
|
+
|
122
|
+
Additional configuration data for Chef attributes can be passed in
|
123
|
+
to Chef solo. This is done by setting the `json` property with a Ruby
|
124
|
+
hash (dictionary-like object), which is converted to JSON and passed
|
125
|
+
in to Chef:
|
126
|
+
|
127
|
+
```
|
128
|
+
Vagrant.configure("2") do |config|
|
129
|
+
config.vm.provision "chef_solo" do |chef|
|
130
|
+
# ...
|
131
|
+
|
132
|
+
chef.json = {
|
133
|
+
"apache" => {
|
134
|
+
"listen_address" => "0.0.0.0"
|
135
|
+
}
|
136
|
+
}
|
137
|
+
end
|
138
|
+
end
|
139
|
+
```
|
140
|
+
|
141
|
+
Hashes, arrays, etc. can be used with the JSON configuration object. Basically,
|
142
|
+
anything that can be turned cleanly into JSON works.
|
143
|
+
|
144
|
+
## Custom Node Name
|
145
|
+
|
146
|
+
You can specify a custom node name by setting the `node_name` property. This
|
147
|
+
is useful for cookbooks that may depend on this being set to some sort
|
148
|
+
of value. Example:
|
149
|
+
|
150
|
+
```ruby
|
151
|
+
Vagrant.configure("2") do |config|
|
152
|
+
config.vm.provision "chef_solo" do |chef|
|
153
|
+
chef.node_name = "foo"
|
154
|
+
end
|
155
|
+
end
|
156
|
+
```
|