2009-03-02 12:29:31 +01:00
|
|
|
define postfix::hash ($ensure) {
|
2008-12-03 17:53:28 +01:00
|
|
|
file {"${name}":
|
|
|
|
ensure => $ensure,
|
|
|
|
mode => 600,
|
2008-12-10 21:35:10 +01:00
|
|
|
seltype => "postfix_etc_t",
|
2008-12-03 17:53:28 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
file {"${name}.db":
|
|
|
|
ensure => $ensure,
|
|
|
|
mode => 600,
|
|
|
|
require => [File["${name}"], Exec["generate ${name}.db"]],
|
2008-12-10 21:35:10 +01:00
|
|
|
seltype => "postfix_etc_t",
|
2008-12-03 17:53:28 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
exec {"generate ${name}.db":
|
|
|
|
command => "postmap ${name}",
|
|
|
|
#creates => "${name}.db", # this prevents postmap from being run !
|
|
|
|
subscribe => File["${name}"],
|
|
|
|
refreshonly => true
|
|
|
|
}
|
|
|
|
}
|