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) { ...@@ -30,6 +30,10 @@ define postfix::config ($value, $ensure = present) {
validate_re($ensure, ['present', 'absent'], validate_re($ensure, ['present', 'absent'],
"\$ensure must be either 'present' or 'absent', got '${ensure}'") "\$ensure must be either 'present' or 'absent', got '${ensure}'")
if (!defined(Class['postfix'])) {
fail 'You must define class postfix before using postfix::config!'
}
Augeas { Augeas {
incl => '/etc/postfix/main.cf', incl => '/etc/postfix/main.cf',
lens => 'Postfix_Main.lns', lens => 'Postfix_Main.lns',
......
...@@ -37,6 +37,10 @@ define postfix::hash ( ...@@ -37,6 +37,10 @@ define postfix::hash (
validate_re($ensure, ['present', 'absent'], validate_re($ensure, ['present', 'absent'],
"\$ensure must be either 'present' or 'absent', got '${ensure}'") "\$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 { if $source and $content {
fail 'You must provide either \'source\' or \'content\', not both' fail 'You must provide either \'source\' or \'content\', not both'
} }
...@@ -65,6 +69,5 @@ define postfix::hash ( ...@@ -65,6 +69,5 @@ define postfix::hash (
#creates => "${name}.db", # this prevents postmap from being run ! #creates => "${name}.db", # this prevents postmap from being run !
subscribe => File[$name], subscribe => File[$name],
refreshonly => true, refreshonly => true,
require => Package['postfix'],
} }
} }
...@@ -158,7 +158,6 @@ class postfix ( ...@@ -158,7 +158,6 @@ class postfix (
} }
# Relationships # Relationships
Class['postfix'] -> Postfix::Config <| |> Postfix::Config <| |> ~> Class['postfix::service']
Class['postfix'] -> Postfix::Transport <| |> Class['postfix'] -> Postfix::Hash <| |>
Class['postfix'] -> Postfix::Virtual <| |>
} }
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