Please review pull request #20: added file and template examples opened by (janschumann)
Description:
I am missing pregenerated files and templates folders. Examples put in there could be helpfull.
For the
puppet-module generate
command, I would like to introduce options like
--with-files
--with-templates
--with-lib
--with-specs
What do you think?
Diff follows:
diff --git a/templates/generator/files/example.file.erb b/templates/generator/files/example.file.erb
new file mode 100644
index 0000000..f9b1bba
--- /dev/null
+++ b/templates/generator/files/example.file.erb
@@ -0,0 +1,13 @@
+# This file is maintained by puppet
+# DO NOT EDIT !
+# all changes will be overridden
+
+# Download the content of this file by
+#
+# file {
+# 'path/to/file/on/node':
+# ensure => present,
+# source => 'puppet:///modules/<%= metadata.name %>/example.file'
+# }
+#
+
diff --git a/templates/generator/templates/example.erb.erb b/templates/generator/templates/example.erb.erb
new file mode 100644
index 0000000..315f009
--- /dev/null
+++ b/templates/generator/templates/example.erb.erb
@@ -0,0 +1,24 @@
+# This file is maintained by puppet
+# DO NOT EDIT !
+# all changes will be overridden
+
+#
+# Get the content of this file:
+#
+# # declare variables in your puppet script
+#
+# ...
+# $myVar = 'foo'
+# ...
+#
+# # declare a file
+#
+# file {
+# 'path/to/file/on/node':
+# ensure => present,
+# content => template("<%= metadata.name %>/example.erb")
+# }
+#
+# Use declared variables in this template (see http://docs.puppetlabs.com/guides/templating.html)
+#
+
On Thu May 31 21:50:41 UTC 2012 pull request #20 was closed.
added file and template examples requested by (janschumann)