summaryrefslogtreecommitdiff
path: root/lib/puppet/type
diff options
context:
space:
mode:
authordduvnjak <dario.duvnjak@gmail.com>2015-01-18 10:49:03 +0100
committerdduvnjak <dario.duvnjak@gmail.com>2015-01-18 10:49:03 +0100
commitdfe5f9cc316a43793da2cb1c4adbc66503907460 (patch)
tree565917e2313fce74b643ea8f1b4f69977de14f6b /lib/puppet/type
parent4a9c69cb9d1242cdb53d1e758c07bdf79a8556cb (diff)
downloadpuppet-vcsrepo-dfe5f9cc316a43793da2cb1c4adbc66503907460.tar.gz
puppet-vcsrepo-dfe5f9cc316a43793da2cb1c4adbc66503907460.tar.bz2
Add submodules feature to git provider
Diffstat (limited to 'lib/puppet/type')
-rw-r--r--lib/puppet/type/vcsrepo.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/puppet/type/vcsrepo.rb b/lib/puppet/type/vcsrepo.rb
index f678389..3f34c57 100644
--- a/lib/puppet/type/vcsrepo.rb
+++ b/lib/puppet/type/vcsrepo.rb
@@ -43,6 +43,9 @@ Puppet::Type.newtype(:vcsrepo) do
feature :p4config,
"The provider understands Perforce Configuration"
+ feature :submodules,
+ "The repository contains submodules which can be optionally initialized"
+
ensurable do
attr_accessor :latest
@@ -215,6 +218,12 @@ Puppet::Type.newtype(:vcsrepo) do
desc "The Perforce P4CONFIG environment."
end
+ newparam :submodules, :required_features => [:submodules] do
+ desc "Initialize and update each submodule in the repository."
+ newvalues(:true, :false)
+ defaultto true
+ end
+
autorequire(:package) do
['git', 'git-core']
end