From 81787d494012f969e10d4af34193c8e81a6dc8b7 Mon Sep 17 00:00:00 2001 From: Brett Lentz Date: Mon, 13 Sep 2010 16:20:58 -0700 Subject: new features for vcsrepo. * support recursive chown on repo * support checking out tags (git) * support adding excludes/ignored files * dropped a few unused methods * rework git provider logic a bit --- lib/puppet/type/vcsrepo.rb | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'lib/puppet/type/vcsrepo.rb') diff --git a/lib/puppet/type/vcsrepo.rb b/lib/puppet/type/vcsrepo.rb index 8b2d93e..f0d2613 100644 --- a/lib/puppet/type/vcsrepo.rb +++ b/lib/puppet/type/vcsrepo.rb @@ -17,10 +17,10 @@ Puppet::Type.newtype(:vcsrepo) do feature :reference_tracking, "The provider supports tracking revision references that can change over time (eg, some VCS tags and branch names)" - + ensurable do attr_accessor :latest - + def insync?(is) @should ||= [] @@ -36,8 +36,8 @@ Puppet::Type.newtype(:vcsrepo) do return false end end - end - + end + newvalue :present do provider.create end @@ -108,6 +108,24 @@ Puppet::Type.newtype(:vcsrepo) do newvalue(/^\S+$/) end + newparam(:owner) do + desc "The user/uid that owns the repository files" + end + + newparam(:group) do + desc "The group/gid that owns the repository files" + end + + newparam(:excludes) do + desc "Files to be excluded from the repository" + end + + newparam(:force) do + desc "Force repository creation, destroying any files on the path in the process." + newvalues(:true, :false) + defaultto false + end + newparam :compression, :required_features => [:gzip_compression] do desc "Compression level" validate do |amount| -- cgit v1.2.3