(puppetlabs/puppet-module-tool) added file and template examples

1 view
Skip to first unread message

weareth...@puppetlabs.com

unread,
May 31, 2012, 4:45:17 PM5/31/12
to puppet...@googlegroups.com

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?

  • Opened: Thu May 31 20:32:37 UTC 2012
  • Based on: puppetlabs:master (f37170eff4cf2fea876c0c754cae71fddc0d6989)
  • Requested merge: janschumann:extend_generator_with_files_and_templates (4c54de691c35c7b25973d6582c5002f1f920b00c)

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)
+#
+

    

weareth...@puppetlabs.com

unread,
May 31, 2012, 6:00:20 PM5/31/12
to puppet...@googlegroups.com

On Thu May 31 21:50:41 UTC 2012 pull request #20 was closed.

added file and template examples requested by (janschumann)

Reply all
Reply to author
Forward
0 new messages