aboutsummaryrefslogtreecommitdiff
path: root/manifests/definitions/hash.pp
blob: f6fbfb6191e92ae5c30e83830711b66b891e3768 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
define postfix::hash ($ensure) {
  file {"${name}":
    ensure => $ensure,
    mode   => 600,
    seltype => "postfix_etc_t",
  }

  file {"${name}.db":
    ensure  => $ensure,
    mode    => 600,
    require => [File["${name}"], Exec["generate ${name}.db"]],
    seltype => "postfix_etc_t",
  }

  exec {"generate ${name}.db":
    command => "postmap ${name}",
    #creates => "${name}.db", # this prevents postmap from being run !
    subscribe => File["${name}"],
    refreshonly => true
  }
}