aboutsummaryrefslogtreecommitdiff
path: root/manifests/defines/config_file.pp
diff options
context:
space:
mode:
authorJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>2015-02-20 15:37:10 -0500
committerJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>2015-02-20 15:37:10 -0500
commitc6beeb1718608389e027d287c7a8ddd586313df2 (patch)
treee7c2d4161b529967079d20ff4f81e5c118cf1a67 /manifests/defines/config_file.pp
parentac5da1df281e636ecffe260b681e8119a1057e1d (diff)
parente9d8147584cf42dceec6d2cdd4314e8a85dc3aeb (diff)
downloadpuppet-common-c6beeb1718608389e027d287c7a8ddd586313df2.tar.gz
puppet-common-c6beeb1718608389e027d287c7a8ddd586313df2.tar.bz2
Merge branch 'master' of git://git.puppet.immerda.ch/module-common
Diffstat (limited to 'manifests/defines/config_file.pp')
-rw-r--r--manifests/defines/config_file.pp55
1 files changed, 0 insertions, 55 deletions
diff --git a/manifests/defines/config_file.pp b/manifests/defines/config_file.pp
deleted file mode 100644
index 2be2460..0000000
--- a/manifests/defines/config_file.pp
+++ /dev/null
@@ -1,55 +0,0 @@
-# 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.
-
-# A simple wrapper to give all configuration files common defaults.
-#
-# Usage:
-# 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 = '', $source = '', $ensure = 'present') {
- file { $name:
- ensure => $ensure,
- # keep old versions on the server
- backup => puppet,
- # default permissions for config files
- mode => 0644, owner => root, group => 0,
- # really detect changes to this file
- checksum => md5,
- }
-
- case $source {
- '': { }
- default: { File[$name] { source => $source } }
- }
-
- case $content {
- '': { }
- default: { File[$name] { content => $content } }
- }
-
-}
-
-