Please review pull request #256: Ticket/2.7.x/11273 init.pp template for module face should be more thorough opened by (ody)

Description:

This patch introduces a more thorough init.pp template that outlines
what parameters and variables are, a spot for Author, and Copyright;
to be used when a new module skeleton is generated using the puppet
module face. Content is based on recommended puppet doc format, suggested by
the official style guide. Plus a few fix ups in syntax. In testing this
template I found errors in our style guide and will be pushing a branch to fix
that recommendation too.

  • Opened: Wed Dec 07 23:40:11 UTC 2011
  • Based on: puppetlabs:2.7.x (999355facb493509e3648845286d6fefe6f598fd)
  • Requested merge: ody:ticket/2.7.x/11273_init.pp_template_for_module_face_should_be_more_thorough (599a146386965f56b015530da59f3dd7cfc12415)

Diff follows:

diff --git a/lib/puppet/module_tool/skeleton/templates/generator/manifests/init.pp.erb b/lib/puppet/module_tool/skeleton/templates/generator/manifests/init.pp.erb
index a17c1a6..04dd525 100644
--- a/lib/puppet/module_tool/skeleton/templates/generator/manifests/init.pp.erb
+++ b/lib/puppet/module_tool/skeleton/templates/generator/manifests/init.pp.erb
@@ -1,16 +1,40 @@
-# Class: <%= metadata.name %>
+# == Class: <%= metadata.name %>
 #
-# This module manages <%= metadata.name %>
+# Full description of class <%= metadata.name %> here.
 #
-# Parameters:
+# === Parameters
 #
-# Actions:
+# Document parameters here.
 #
-# Requires:
+# [*sample_parameter*]
+#   Explanation of what this parameter affects and what it defaults to.
+#   e.g. "Specify one or more upstream ntp servers as an array."
 #
-# Sample Usage:
+# === Variables
+#
+# Here you should define a list of variables that this module would require.
+#
+# [*sample_variable*]
+#   Explanation of how this variable affects the funtion of this class and if it
+#   has a default. e.g. "The parameter enc_ntp_servers must be set by the
+#   External Node Classifier as a comma separated list of hostnames." (Note,
+#   global variables should not be used in preference to class parameters  as of
+#   Puppet 2.6.)
+#
+# === Examples
+#
+#  class { <%= metadata.name %>:
+#    servers => [ 'pool.ntp.org', 'ntp.local.company.com' ]
+#  }
+#
+# === Authors
+#
+# Author Name <aut...@domain.com>
+#
+# === Copyright
+#
+# Copyright 2011 Your name here, unless otherwise noted.
 #
-# [Remember: No empty lines between comments and class definition]
 class <%= metadata.name %> {
 
 

    

--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to puppet-dev@googlegroups.com.
To unsubscribe from this group, send email to puppet-dev+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to