diff options
Diffstat (limited to 'manifests/definitions/hash.pp')
-rw-r--r-- | manifests/definitions/hash.pp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/manifests/definitions/hash.pp b/manifests/definitions/hash.pp new file mode 100644 index 0000000..f21e270 --- /dev/null +++ b/manifests/definitions/hash.pp @@ -0,0 +1,19 @@ +define postfix-ng::hash ($ensure) { + file {"${name}": + ensure => $ensure, + mode => 600, + } + + file {"${name}.db": + ensure => $ensure, + mode => 600, + require => [File["${name}"], Exec["generate ${name}.db"]], + } + + exec {"generate ${name}.db": + command => "postmap ${name}", + #creates => "${name}.db", # this prevents postmap from being run ! + subscribe => File["${name}"], + refreshonly => true + } +} |