Merge branch 'fix/master/puppet-provisioner-nfs-support' of https://github.com/mfournier/vagrant into mfournier-fix/master/puppet-provisioner-nfs-support

Conflicts:
	CHANGELOG.md
	plugins/provisioners/puppet/provisioner/puppet.rb
This commit is contained in:
Mitchell Hashimoto 2013-09-01 13:32:49 -07:00
commit d7b398a905
3 changed files with 10 additions and 2 deletions

View File

@ -56,6 +56,7 @@ IMPROVEMENTS:
to `extra`. [GH-1979]
- provisioners/ansible: `inventory_path` will be auto-generated if not
specified. [GH-1907]
- provisioners/puppet: Add `nfs` option to puppet provisioner. [GH-1308]
- provisioners/shell: Set the `privileged` option to false to run
without sudo. [GH-1370]

View File

@ -10,6 +10,7 @@ module VagrantPlugins
attr_accessor :options
attr_accessor :temp_dir
attr_accessor :working_directory
attr_accessor :nfs
def initialize
super
@ -22,6 +23,7 @@ module VagrantPlugins
@facter = {}
@temp_dir = UNSET_VALUE
@working_directory = UNSET_VALUE
@nfs = UNSET_VALUE
end
def finalize!
@ -33,6 +35,7 @@ module VagrantPlugins
@module_path = nil if @module_path == UNSET_VALUE
@temp_dir = "/tmp/vagrant-puppet" if @temp_dir == UNSET_VALUE
@working_directory = nil if @working_directory == UNSET_VALUE
@nfs = false if @nfs == UNSET_VALUE
end
# Returns the manifests path expanded relative to the root path of the

View File

@ -27,14 +27,18 @@ module VagrantPlugins
@module_paths << [path, File.join(config.temp_dir, "modules-#{i}")]
end
folder_opts = {}
folder_opts[:nfs] = true if @config.nfs
folder_opts[:owner] = "root" if !folder_opts[:nfs]
# Share the manifests directory with the guest
root_config.vm.synced_folder(
@expanded_manifests_path, manifests_guest_path, { :owner => 'root' } )
@expanded_manifests_path, manifests_guest_path, folder_opts)
# Share the module paths
count = 0
@module_paths.each do |from, to|
root_config.vm.synced_folder(from, to, { :owner => 'root' } )
root_config.vm.synced_folder(from, to, folder_opts)
count += 1
end
end