diff options
author | Matthias Pigulla <mp@webfactory.de> | 2011-11-12 14:08:13 +0100 |
---|---|---|
committer | Matthias Pigulla <mp@webfactory.de> | 2011-11-12 14:08:13 +0100 |
commit | 924e13367b19e82fab94a13231b4febb1d3f09ac (patch) | |
tree | 5d608549d54df2ed742048ba7dcbe5e5125a45b0 /lib | |
parent | 9aa17796f99f7f6966b1a0753b606f4e7b508c8a (diff) | |
download | puppet-vcsrepo-924e13367b19e82fab94a13231b4febb1d3f09ac.tar.gz puppet-vcsrepo-924e13367b19e82fab94a13231b4febb1d3f09ac.tar.bz2 |
Fix owner/group as well (#10787)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/provider/vcsrepo/cvs.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/puppet/provider/vcsrepo/cvs.rb b/lib/puppet/provider/vcsrepo/cvs.rb index d8d8abe..c42136e 100644 --- a/lib/puppet/provider/vcsrepo/cvs.rb +++ b/lib/puppet/provider/vcsrepo/cvs.rb @@ -13,6 +13,7 @@ Puppet::Type.type(:vcsrepo).provide(:cvs, :parent => Puppet::Provider::Vcsrepo) else checkout_repository end + update_owner end def exists? @@ -66,6 +67,7 @@ Puppet::Type.type(:vcsrepo).provide(:cvs, :parent => Puppet::Provider::Vcsrepo) def revision=(desired) at_path do cvs('update', '-dr', desired, '.') + update_owner @rev = desired end end @@ -104,4 +106,10 @@ Puppet::Type.type(:vcsrepo).provide(:cvs, :parent => Puppet::Provider::Vcsrepo) cvs('-d', path, 'init') end + def update_owner + if @resource.value(:owner) or @resource.value(:group) + set_ownership + end + end + end |