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
8b0cd58a
Commit
8b0cd58a
authored
Jul 22, 2013
by
Raphaël Pinson
Browse files
Add missing variables for ldap
parent
3f7ca33b
Changes
3
Hide whitespace changes
Inline
Side-by-side
manifests/init.pp
View file @
8b0cd58a
...
...
@@ -11,6 +11,10 @@
#
# [*ldap_base*] - (string)
#
# [*ldap_host*] - (string)
#
# [*ldap_options*] - (string)
#
# [*mail_user*] - (string) The mail user
#
# [*mailman*] - (boolean)
...
...
@@ -60,6 +64,8 @@ class postfix (
$inet_interfaces
=
'all'
,
$ldap
=
false
,
$ldap_base
=
undef
,
$ldap_host
=
undef
,
$ldap_options
=
undef
,
$mail_user
=
'vmail'
,
# postfix_mail_user
$mailman
=
false
,
$maincf_source
=
"puppet:///modules/
${module_name}
/main.cf"
,
...
...
@@ -93,6 +99,8 @@ class postfix (
validate_string
(
$inet_interfaces
)
validate_string
(
$ldap_base
)
validate_string
(
$ldap_host
)
validate_string
(
$ldap_options
)
validate_string
(
$mail_user
)
validate_string
(
$maincf_source
)
validate_string
(
$mastercf_source
)
...
...
manifests/ldap.pp
View file @
8b0cd58a
...
...
@@ -6,6 +6,16 @@ class postfix::ldap {
fail
'Missing $postfix_ldap_base !'
}
$ldap_host
=
$postfix::ldap_host
?
{
undef
=>
'localhost'
,
default
=>
$postfix::ldap_host
,
}
$ldap_base
=
$postfix::ldap_base
$ldap_options
=
$postfix::ldap_options
?
{
undef
=>
''
,
default
=>
$postfix::ldap_options
,
}
file
{
'/etc/postfix/ldap-aliases.cf'
:
ensure
=>
present
,
owner
=>
root
,
...
...
templates/postfix-ldap-aliases.cf.erb
View file @
8b0cd58a
# File managed by puppet
<%
if
has_variable?
(
"postfix_ldap_host"
)
-%>
server_host =
<%=
postfix_ldap_host
%>
<%
else
-%>
server_host = localhost
<%
end
-%>
<%
if
has_variable?
(
"postfix_ldap_base"
)
-%>
search_base =
<%=
postfix_ldap_base
%>
<%
end
-%>
<%
if
has_variable?
(
'postfix_ldap_options'
)
-%>
<%=
postfix_ldap_options
%>
server_host =
<%=
@ldap_host
%>
<%
if
@ldap_base
-%>
search_base =
<%=
@ldap_base
%>
<%
end
-%>
<%=
@ldap_options
%>
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