diff options
author | Aaron Stone <aaron@serendipity.cx> | 2013-07-17 21:26:50 -0700 |
---|---|---|
committer | Aaron Stone <aaron@serendipity.cx> | 2013-07-17 21:26:50 -0700 |
commit | 0fec94345ea9aab7920684f8e383d17d44d553dd (patch) | |
tree | 8fe1b2dd36ce105a8f54e1f47d059ba232b01702 | |
parent | 1dcc84e5ee71eb0b85622affc7f097f9b02cb5d9 (diff) | |
parent | 129f2de0d3495ac6f6cc7b76a00bff8bfcd9c128 (diff) | |
download | puppet-vcsrepo-0fec94345ea9aab7920684f8e383d17d44d553dd.tar.gz puppet-vcsrepo-0fec94345ea9aab7920684f8e383d17d44d553dd.tar.bz2 |
Merge pull request #81 from sepulworld/svn-configurtation-parameter
Adding svn configuration parameter, and docs
-rw-r--r-- | README.SVN.markdown | 15 | ||||
-rw-r--r-- | lib/puppet/provider/vcsrepo/svn.rb | 6 | ||||
-rw-r--r-- | lib/puppet/type/vcsrepo.rb | 7 |
3 files changed, 27 insertions, 1 deletions
diff --git a/README.SVN.markdown b/README.SVN.markdown index 489f5bf..f374094 100644 --- a/README.SVN.markdown +++ b/README.SVN.markdown @@ -32,6 +32,21 @@ You can provide a specific `revision`: revision => '1234' } + +Using a specified Subversion configuration directory +----------------------------- + +Provide a `configuration` parameter which should be a directory path on the local system where your svn configuration +files are. Typically, it is /path/to/.subversion: + + vcsrepo { "/path/to/repo": + ensure => present, + provider => svn, + source => "svn://svnrepo/hello/branches/foo", + configuration => "/path/to/.subversion" + } + + For sources that use SSH (eg, `svn+ssh://...`) ---------------------------------------------- diff --git a/lib/puppet/provider/vcsrepo/svn.rb b/lib/puppet/provider/vcsrepo/svn.rb index 2dc0fd1..2e7cda5 100644 --- a/lib/puppet/provider/vcsrepo/svn.rb +++ b/lib/puppet/provider/vcsrepo/svn.rb @@ -6,7 +6,7 @@ Puppet::Type.type(:vcsrepo).provide(:svn, :parent => Puppet::Provider::Vcsrepo) optional_commands :svn => 'svn', :svnadmin => 'svnadmin' - has_features :filesystem_types, :reference_tracking, :basic_auth + has_features :filesystem_types, :reference_tracking, :basic_auth, :configuration def create if !@resource.value(:source) @@ -53,6 +53,10 @@ Puppet::Type.type(:vcsrepo).provide(:svn, :parent => Puppet::Provider::Vcsrepo) args.push('--force') end + if @resource.value(:configuration) + args.push('--config-dir', @resource.value(:configuration)) + end + return args end diff --git a/lib/puppet/type/vcsrepo.rb b/lib/puppet/type/vcsrepo.rb index 45ac455..fc20f75 100644 --- a/lib/puppet/type/vcsrepo.rb +++ b/lib/puppet/type/vcsrepo.rb @@ -30,6 +30,9 @@ Puppet::Type.newtype(:vcsrepo) do feature :multiple_remotes, "The repository tracks multiple remote repositories" + + feature :configuration, + "The configuration directory to use" ensurable do attr_accessor :latest @@ -176,5 +179,9 @@ Puppet::Type.newtype(:vcsrepo) do desc "The remote repository to track" defaultto "origin" end + + newparam :configuration, :required_features => [:configuration] do + desc "The configuration directory to use" + end end |