summaryrefslogtreecommitdiff
path: root/manifests/defines/config_file.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/defines/config_file.pp')
-rw-r--r--manifests/defines/config_file.pp23
1 files changed, 22 insertions, 1 deletions
diff --git a/manifests/defines/config_file.pp b/manifests/defines/config_file.pp
index 4433878..e539c6d 100644
--- a/manifests/defines/config_file.pp
+++ b/manifests/defines/config_file.pp
@@ -1,4 +1,4 @@
-# common/manifests/defines/config_file.pp -- put a config file with default permissions
+# common/manifests/defines/config_file.pp -- create a config file with default permissions
# Copyright (C) 2007 David Schmitt <david@schmitt.edv-bus.at>
# See LICENSE for the full license granted to you.
@@ -6,6 +6,27 @@
# config_file { filename:
# content => "....\n",
# }
+#
+# Examples:
+#
+# To create the file /etc/vservers/${vs_name}/context with specific
+# content:
+#
+# config_file { "/etc/vservers/${vs_name}/context":
+# content => "${context}\n",
+# notify => Exec["vs_restart_${vs_name}"],
+# require => Exec["vs_create_${vs_name}"];
+# }
+#
+# To create the file /etc/apache2/sites-available/munin-stats with the
+# content pulled from a template:
+#
+# config_file { "/etc/apache2/sites-available/munin-stats":
+# content => template("apache/munin-stats"),
+# require => Package["apache2"],
+# notify => Exec["reload-apache2"]
+# }
+
define config_file ($content) {
file { $name:
content => $content,