]> gitweb.fluxo.info Git - puppet-common.git/commitdiff
Make the usage more friendly
authorMicah Anderson <micah@riseup.net>
Fri, 5 Oct 2007 20:04:31 +0000 (16:04 -0400)
committerDavid Schmitt <david@schmitt.edv-bus.at>
Mon, 8 Oct 2007 09:40:09 +0000 (11:40 +0200)
manifests/defines/replace.pp

index ae4498ee56b71db252bd80a9f40b8e74519da768..fcff84d75bd90422d2b1063c1457dac315066889 100644 (file)
@@ -4,13 +4,20 @@
 
 # Usage:
 #
-# # replace the current port in /etc/munin/munin-node.conf
-# # with a new, only disturbing the file when needed
+# replace { description: 
+#           file => "filename",
+#           pattern => "regexp",
+#           replacement => "replacement"
+#
+# For example, to replace the current port in /etc/munin/munin-node.conf
+# with a new port, but only disturbing the file when needed:
+#
 # replace { set_munin_node_port:
 #      file => "/etc/munin/munin-node.conf",
 #      pattern => "^port (?!$port)[0-9]*",
 #      replacement => "port $port"
 # }  
+
 define replace($file, $pattern, $replacement) {
        $pattern_no_slashes = slash_escape($pattern)
        $replacement_no_slashes = slash_escape($replacement)
@@ -20,6 +27,3 @@ define replace($file, $pattern, $replacement) {
                alias => "exec_$name",
        }
 }
-
-
-