Commit df23eac8 authored by Raphaël Pinson's avatar Raphaël Pinson
Browse files

Fix dependencies

parent 8ecb004c
......@@ -30,6 +30,10 @@ define postfix::config ($value, $ensure = present) {
validate_re($ensure, ['present', 'absent'],
"\$ensure must be either 'present' or 'absent', got '${ensure}'")
if (!defined(Class['postfix'])) {
fail 'You must define class postfix before using postfix::config!'
}
Augeas {
incl => '/etc/postfix/main.cf',
lens => 'Postfix_Main.lns',
......
......@@ -37,6 +37,10 @@ define postfix::hash (
validate_re($ensure, ['present', 'absent'],
"\$ensure must be either 'present' or 'absent', got '${ensure}'")
if (!defined(Class['postfix'])) {
fail 'You must define class postfix before using postfix::config!'
}
if $source and $content {
fail 'You must provide either \'source\' or \'content\', not both'
}
......@@ -65,6 +69,5 @@ define postfix::hash (
#creates => "${name}.db", # this prevents postmap from being run !
subscribe => File[$name],
refreshonly => true,
require => Package['postfix'],
}
}
......@@ -158,7 +158,6 @@ class postfix (
}
# Relationships
Class['postfix'] -> Postfix::Config <| |>
Class['postfix'] -> Postfix::Transport <| |>
Class['postfix'] -> Postfix::Virtual <| |>
Postfix::Config <| |> ~> Class['postfix::service']
Class['postfix'] -> Postfix::Hash <| |>
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment