X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fmunin%2Fmanifests%2Fconf.pp;h=5413c434989f32473d3d45400ccbcb255708280c;hb=45051a04bcdc18d3ebafd00d20369d8060d7b97a;hp=a4ac0ab7e278cd1011b8287019406c2875d3cad5;hpb=6b175636bb82d048655a901e6eab183ffad58fc3;p=mirror%2Fdsa-puppet.git diff --git a/modules/munin/manifests/conf.pp b/modules/munin/manifests/conf.pp index a4ac0ab7e..5413c4349 100644 --- a/modules/munin/manifests/conf.pp +++ b/modules/munin/manifests/conf.pp @@ -1,7 +1,7 @@ define munin::conf ( $ensure=present, - $content='', - $source='' + $content=false, + $source=false ) { include munin @@ -16,9 +16,19 @@ define munin::conf ( default: { fail ( "Unknown ensure value: '$ensure'" ) } } - file { "/etc/munin/plugin-conf.d/${name}": - ensure => $ensure, - require => Package['munin-node'], - notify => Service['munin-node'], + if $source { + file { "/etc/munin/plugin-conf.d/${name}": + ensure => $ensure, + source => $source, + require => Package['munin-node'], + notify => Service['munin-node'], + } + } elsif $content { + file { "/etc/munin/plugin-conf.d/${name}": + ensure => $ensure, + content => $content, + require => Package['munin-node'], + notify => Service['munin-node'], + } } }