From 7f716f4b63bb7054eb62c00d5a801fdc39a6327d Mon Sep 17 00:00:00 2001 From: John Cooper Date: Wed, 11 Feb 2015 12:52:11 +0000 Subject: [PATCH 1/3] Added synced_folder_args to puppet provisioner --- plugins/provisioners/puppet/config/puppet.rb | 9 +++++---- plugins/provisioners/puppet/provisioner/puppet.rb | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/provisioners/puppet/config/puppet.rb b/plugins/provisioners/puppet/config/puppet.rb index 99b06face..9910c6e05 100644 --- a/plugins/provisioners/puppet/config/puppet.rb +++ b/plugins/provisioners/puppet/config/puppet.rb @@ -1,7 +1,7 @@ module VagrantPlugins module Puppet module Config - class Puppet < Vagrant.plugin("2", :config) + class Puppet < Vagrant.plugin("2", :config) # The path to Puppet's bin/ directory. # @return [String] @@ -16,6 +16,7 @@ module VagrantPlugins attr_accessor :module_path attr_accessor :options attr_accessor :synced_folder_type + attr_accessor :synced_folder_args attr_accessor :temp_dir attr_accessor :working_directory @@ -82,7 +83,7 @@ module VagrantPlugins @environment = "production" if @environment == UNSET_VALUE if @manifests_path == UNSET_VALUE @manifests_path = nil - end + end if @manifest_file == UNSET_VALUE @manifest_file = nil end @@ -91,9 +92,9 @@ module VagrantPlugins @binary_path = nil if @binary_path == UNSET_VALUE @module_path = nil if @module_path == UNSET_VALUE @synced_folder_type = nil if @synced_folder_type == UNSET_VALUE + @synced_folder_args = nil if @synced_folder_args == UNSET_VALUE @temp_dir = "/tmp/vagrant-puppet" if @temp_dir == UNSET_VALUE @working_directory = nil if @working_directory == UNSET_VALUE - end # Returns the module paths as an array of paths expanded relative to the @@ -149,7 +150,7 @@ module VagrantPlugins if environment_path == nil && manifests_path == nil errors << "Please specify either a Puppet environment_path + environment (preferred) or manifests_path (deprecated)." - end + end # Module paths validation this_expanded_module_paths.each do |path| diff --git a/plugins/provisioners/puppet/provisioner/puppet.rb b/plugins/provisioners/puppet/provisioner/puppet.rb index 00cc1554c..36b5261f9 100644 --- a/plugins/provisioners/puppet/provisioner/puppet.rb +++ b/plugins/provisioners/puppet/provisioner/puppet.rb @@ -31,6 +31,7 @@ module VagrantPlugins folder_opts = {} folder_opts[:type] = @config.synced_folder_type if @config.synced_folder_type folder_opts[:owner] = "root" if !@config.synced_folder_type + folder_opts[:args] = @config.synced_folder_args if @config.synced_folder_args if @config.environment_path.is_a?(Array) # Share the environments directory with the guest From 342eb4fa36a9d6630a2ddea77d76b9d1a56c9add Mon Sep 17 00:00:00 2001 From: John Cooper Date: Wed, 18 Feb 2015 16:11:02 +0000 Subject: [PATCH 2/3] Added doc for puppet.synced_folder_args --- website/docs/source/v2/provisioning/puppet_apply.html.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/website/docs/source/v2/provisioning/puppet_apply.html.md b/website/docs/source/v2/provisioning/puppet_apply.html.md index 9d9e5726d..2d6b6af1d 100644 --- a/website/docs/source/v2/provisioning/puppet_apply.html.md +++ b/website/docs/source/v2/provisioning/puppet_apply.html.md @@ -58,6 +58,10 @@ available below this section. this will use the default synced folder type. For example, you can set this to "nfs" to use NFS synced folders. +* `synced_folder_args` (array) - Arguments that are passed to the folder sync. + For example ['-a', '--delete', '--exclude=fixtures'] for the rsync sync + command. + * `temp_dir` (string) - The directory where all the data associated with the Puppet run (manifest files, modules, etc.) will be stored on the guest machine. @@ -65,6 +69,7 @@ available below this section. * `working_directory` (string) - Path in the guest that will be the working directory when Puppet is executed. This is usually only set because relative paths are used in the Hiera configuration. + ~> If only `environment` and `environments_path` are specified, it will parse and use the manifest specified in the `environment.conf` file. If From d8285653e244e807c687f1ec3ca29a60d38fbd00 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Sat, 30 May 2015 21:26:40 -0700 Subject: [PATCH 3/3] Remove extra newline --- website/docs/source/v2/provisioning/puppet_apply.html.md | 1 - 1 file changed, 1 deletion(-) diff --git a/website/docs/source/v2/provisioning/puppet_apply.html.md b/website/docs/source/v2/provisioning/puppet_apply.html.md index 2d6b6af1d..89fe90195 100644 --- a/website/docs/source/v2/provisioning/puppet_apply.html.md +++ b/website/docs/source/v2/provisioning/puppet_apply.html.md @@ -69,7 +69,6 @@ available below this section. * `working_directory` (string) - Path in the guest that will be the working directory when Puppet is executed. This is usually only set because relative paths are used in the Hiera configuration. - ~> If only `environment` and `environments_path` are specified, it will parse and use the manifest specified in the `environment.conf` file. If