Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Puppet Camptocamp Postfix
Commits
3f7ca33b
Commit
3f7ca33b
authored
Jul 22, 2013
by
Raphaël Pinson
Browse files
postfix::ldap
parent
22901939
Changes
3
Hide whitespace changes
Inline
Side-by-side
manifests/files.pp
View file @
3f7ca33b
...
...
@@ -69,7 +69,7 @@ class postfix::files {
::
postfix::config
{
'myorigin'
:
value
=>
$myorigin
;
'alias_maps'
:
value
=>
'hash:/etc/aliases'
;
'alias_maps'
:
value
=>
$postfix::alias_maps
;
'inet_interfaces'
:
value
=>
$inet_interfaces
;
}
...
...
manifests/init.pp
View file @
3f7ca33b
...
...
@@ -7,10 +7,18 @@
# Parameters:
# [*inet_interfaces*] - (string)
#
# [*ldap*] - (boolean)
#
# [*ldap_base*] - (string)
#
# [*mail_user*] - (string) The mail user
#
# [*mailman*] - (boolean)
#
# [*maincf_source*] - (string)
#
# [*mastercf_source*] - (string)
#
# [*master_smtp*] - (string)
#
# [*master_smtps*] - (string)
...
...
@@ -50,6 +58,8 @@
#
class
postfix
(
$inet_interfaces
=
'all'
,
$ldap
=
false
,
$ldap_base
=
undef
,
$mail_user
=
'vmail'
,
# postfix_mail_user
$mailman
=
false
,
$maincf_source
=
"puppet:///modules/
${module_name}
/main.cf"
,
...
...
@@ -72,6 +82,7 @@ class postfix (
)
inherits
postfix::params
{
validate_bool
(
$ldap
)
validate_bool
(
$mailman
)
validate_bool
(
$mta
)
validate_bool
(
$satellite
)
...
...
@@ -81,7 +92,10 @@ class postfix (
validate_bool
(
$use_sympa
)
validate_string
(
$inet_interfaces
)
validate_string
(
$ldap_base
)
validate_string
(
$mail_user
)
validate_string
(
$maincf_source
)
validate_string
(
$mastercf_source
)
validate_string
(
$master_smtp
)
validate_string
(
$master_smtps
)
validate_string
(
$mydestination
)
...
...
@@ -98,11 +112,20 @@ class postfix (
default
=>
$smtp_listen
,
}
$alias_maps
=
$ldap
?
{
false
=>
'hash:/etc/aliases'
,
true
=>
'"hash:/etc/aliases, ldap:/etc/postfix/ldap-aliases.cf"'
,
}
class
{
'postfix::packages'
:
}
->
class
{
'postfix::files'
:
}
~>
class
{
'postfix::service'
:
}
->
Class
[
'postfix'
]
if
$ldap
{
include
::postfix::ldap
}
if
$mta
{
include
::postfix::mta
}
...
...
manifests/ldap.pp
View file @
3f7ca33b
class
postfix::ldap
inherits
postfix
{
Postfix
::
Config
[
'alias_maps'
]
{
value
=>
'"hash:/etc/aliases, ldap:/etc/postfix/ldap-aliases.cf"'
,
}
class
postfix::ldap
{
package
{
'postfix-ldap'
:
}
if
!
$::postfix
_
ldap_base
{
if
!
$::postfix
::
ldap_base
{
fail
'Missing $postfix_ldap_base !'
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment