X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fferm%2Fmanifests%2Fconf.pp;h=0dffa773d9798bce293bf9f48e5c83ca6fd8819f;hb=58529303e11dc022f7db888ade308a4edb700177;hp=a97ec69017fca3a4e4e5dd5c74f30e7eabd8263d;hpb=2ac3c31e46729c35e8ce201e27b79b43c79c11b2;p=mirror%2Fdsa-puppet.git diff --git a/modules/ferm/manifests/conf.pp b/modules/ferm/manifests/conf.pp index a97ec6901..0dffa773d 100644 --- a/modules/ferm/manifests/conf.pp +++ b/modules/ferm/manifests/conf.pp @@ -1,4 +1,6 @@ -define ferm::conf ($content=undef, $source=undef) { +define ferm::conf ($content=undef, $source=undef, $ensure=present) { + + include ferm case $ensure { present,absent: {} @@ -9,15 +11,19 @@ define ferm::conf ($content=undef, $source=undef) { fail ( "Can't define both source and content for ${name}" ) } + $fname = "/etc/ferm/conf.d/${name}.conf" + if $source { - file { "/etc/ferm/conf.d/${name}": + file { $fname: ensure => $ensure, - source => $source + source => $source, + notify => Service['ferm'] } } elsif $content { - file { "/etc/ferm/conf.d/${name}": + file { $fname: ensure => $ensure, content => $content, + notify => Service['ferm'] } } }