diff options
author | James Turnbull <james@lovedthanlost.net> | 2012-05-23 10:22:57 -0700 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2012-05-23 10:22:57 -0700 |
commit | 493dc2172bd01dcb4f47e4233292cd3dcdea08b9 (patch) | |
tree | 2c00b41882420ae951149d7f4f0c41d9a2cbe746 /lib/puppet/type | |
parent | 6453643104c9ff142677af562584555cc886c8d9 (diff) | |
parent | dce22cfd2d2f4c237df597cf6206d5c0d1aebc65 (diff) | |
download | puppet-vcsrepo-493dc2172bd01dcb4f47e4233292cd3dcdea08b9.tar.gz puppet-vcsrepo-493dc2172bd01dcb4f47e4233292cd3dcdea08b9.tar.bz2 |
Merge pull request #24 from jesusaurus/feature/git
Add the ability to specify a git remote
Diffstat (limited to 'lib/puppet/type')
-rw-r--r-- | lib/puppet/type/vcsrepo.rb | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/lib/puppet/type/vcsrepo.rb b/lib/puppet/type/vcsrepo.rb index 2792cfe..231ce93 100644 --- a/lib/puppet/type/vcsrepo.rb +++ b/lib/puppet/type/vcsrepo.rb @@ -25,6 +25,9 @@ Puppet::Type.newtype(:vcsrepo) do feature :modules, "The repository contains modules that can be chosen of" + feature :multiple_remotes, + "The repository tracks multiple remote repositories" + ensurable do attr_accessor :latest @@ -93,7 +96,7 @@ Puppet::Type.newtype(:vcsrepo) do end - newparam(:path) do + newparam :path do desc "Absolute path to repository" isnamevar validate do |value| @@ -104,32 +107,32 @@ Puppet::Type.newtype(:vcsrepo) do end end - newparam(:source) do + newparam :source do desc "The source URI for the repository" end - newparam(:fstype, :required_features => [:filesystem_types]) do + newparam :fstype, :required_features => [:filesystem_types] do desc "Filesystem type" end - newproperty(:revision) do + newproperty :revision do desc "The revision of the repository" newvalue(/^\S+$/) end - newparam(:owner) do + newparam :owner do desc "The user/uid that owns the repository files" end - newparam(:group) do + newparam :group do desc "The group/gid that owns the repository files" end - newparam(:excludes) do + newparam :excludes do desc "Files to be excluded from the repository" end - newparam(:force) do + newparam :force do desc "Force repository creation, destroying any files on the path in the process." newvalues(:true, :false) defaultto false @@ -159,4 +162,10 @@ Puppet::Type.newtype(:vcsrepo) do newparam :module, :required_features => [:modules] do desc "The repository module to manage" end + + newparam :remote, :required_features => [:multiple_remotes] do + desc "The remote repository to track" + defaultto "origin" + end + end |