diff options
Diffstat (limited to 'manifests/defines/line.pp')
-rw-r--r-- | manifests/defines/line.pp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/manifests/defines/line.pp b/manifests/defines/line.pp index 6026a84..42bd5a1 100644 --- a/manifests/defines/line.pp +++ b/manifests/defines/line.pp @@ -1,4 +1,4 @@ -# common/manifests/defines/line.pp -- a trivial puppet lined +# common/manifests/defines/line.pp -- a trivial mechanism to ensure a line exists in a file # Copyright (C) 2007 David Schmitt <david@schmitt.edv-bus.at> # See LICENSE for the full license granted to you. @@ -8,6 +8,21 @@ # line => "content", # ensure => {absent,*present*} # } +# +# Example: +# The following ensures that the line "allow ^$munin_host$" exists +# in /etc/munin/munin-node.conf, and if there are any changes notify the service for +# a restart +# +# line { allow_munin_host: +# file => "/etc/munin/munin-node.conf", +# line => "allow ^$munin_host$", +# ensure => present, +# notify => Service[munin-node], +# require => Package[munin-node], +# } +# +# define line($file, $line, $ensure = 'present') { case $ensure { default : { err ( "unknown ensure value $ensure" ) } |