summaryrefslogtreecommitdiffstats
path: root/examples/code/modules/sample-module/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/code/modules/sample-module/manifests/init.pp')
-rw-r--r--examples/code/modules/sample-module/manifests/init.pp12
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/code/modules/sample-module/manifests/init.pp b/examples/code/modules/sample-module/manifests/init.pp
new file mode 100644
index 000000000..1af8dff1f
--- /dev/null
+++ b/examples/code/modules/sample-module/manifests/init.pp
@@ -0,0 +1,12 @@
+# Jeff McCune <jeff.mccune@northstarlabs.net>
+#
+# Demonstration of a custom parser function and erb template within
+# a module, working in concert.
+
+class sample-module {
+ $fqdn_to_dn = hostname_to_dn($domain)
+ $sample_template = template("sample-module/sample.erb")
+
+ notice("hostname_to_dn module function returned: [$fqdn_to_dn]")
+ info("sample.erb looks like:\n$sample_template")
+}