provisioners/puppet: synced_folder_type [GH-2709]

This commit is contained in:
Mitchell Hashimoto 2014-01-02 14:37:47 -08:00
parent 862331fbf0
commit 1da271c536
3 changed files with 29 additions and 5 deletions

View File

@ -1,9 +1,21 @@
## 1.5.0 (unreleased)
DEPRECATIONS:
- provisioners/puppet: The "nfs" setting has been replaced by
`synced_folder_type`. The "nfs" setting will be removed in the next
version.
FEATURES:
- **New guest:** Funtoo (change host name and networks supported)
IMPROVEMENTS:
- provisioners/puppet: New config `synced_folder_type` replaces the
`nfs` option. This can be used to set the synced folders the provisioner
needs to any type. [GH-2709]
## 1.4.3 (January 2, 2014)
BUG FIXES:

View File

@ -14,7 +14,7 @@ module VagrantPlugins
attr_accessor :options
attr_accessor :temp_dir
attr_accessor :working_directory
attr_accessor :nfs
attr_accessor :synced_folder_type
def initialize
super
@ -25,9 +25,21 @@ module VagrantPlugins
@module_path = UNSET_VALUE
@options = []
@facter = {}
@synced_folder_type = UNSET_VALUE
@temp_dir = UNSET_VALUE
@working_directory = UNSET_VALUE
@nfs = UNSET_VALUE
end
def nfs=(value)
puts "DEPRECATION: The 'nfs' setting for the Puppet provisioner is"
puts "deprecated. Please use the 'synced_folder_type' setting instead."
puts "The 'nfs' setting will be removed in the next version of Vagrant."
if value
@synced_folder_type = "nfs"
else
@synced_folder_type = nil
end
end
def finalize!
@ -46,9 +58,9 @@ module VagrantPlugins
@hiera_config_path = nil if @hiera_config_path == UNSET_VALUE
@manifest_file = "default.pp" if @manifest_file == UNSET_VALUE
@module_path = nil if @module_path == UNSET_VALUE
@synced_folder_type = nil if @synced_folder_type == UNSET_VALUE
@temp_dir = nil if @temp_dir == UNSET_VALUE
@working_directory = nil if @working_directory == UNSET_VALUE
@nfs = false if @nfs == UNSET_VALUE
# Set a default temp dir that has an increasing counter so
# that multiple Puppet definitions won't overwrite each other

View File

@ -27,8 +27,8 @@ module VagrantPlugins
end
folder_opts = {}
folder_opts[:nfs] = true if @config.nfs
folder_opts[:owner] = "root" if !folder_opts[:nfs]
folder_opts[:type] = @config.synced_folder_type if @config.synced_folder_type
folder_opts[:owner] = "root" if !@config.synced_folder_type
# Share the manifests directory with the guest
if @config.manifests_path[0].to_sym == :host