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
cd0090f0
Commit
cd0090f0
authored
May 20, 2013
by
Raphaël Pinson
Browse files
Various fixes, add spec for init class
parent
2b796d24
Changes
7
Hide whitespace changes
Inline
Side-by-side
manifests/params.pp
View file @
cd0090f0
class
postfix::params
{
case
$::osfamily
{
'RedHat'
:
{
$seltype
=
$::lsbmajdistrelease
{
'4'
=>
'etc_t'
,
'5'
,
'6'
=>
'postfix_etc_t'
,
$seltype
=
$::lsbmajdistrelease
?
{
'4'
=>
'etc_t'
,
/5|6/
=>
'postfix_etc_t'
,
default
=>
undef
,
}
...
...
@@ -13,7 +13,7 @@ class postfix::params {
}
'Debian'
:
{
$seltype
=
undef
,
$seltype
=
undef
$mailx_package
=
$::lsbdistcodename
?
{
/sarge|etch|lenny|lucid/
=>
'mailx'
,
...
...
spec/.rspec
0 → 100644
View file @
cd0090f0
--format
s
--colour
--loadby
mtime
--backtrace
spec/classes/postfix_spec.rb
0 → 100644
View file @
cd0090f0
require
'spec_helper'
describe
'postfix'
do
context
'when on Debian'
do
let
(
:facts
)
{
{
:operatingsystem
=>
'Debian'
,
:osfamily
=>
'Debian'
,
}
}
it
{
should
contain_package
(
'postfix'
)
}
end
context
'when on RedHat'
do
let
(
:facts
)
{
{
:operatingsystem
=>
'RedHat'
,
:osfamily
=>
'RedHat'
,
}
}
it
{
should
contain_package
(
'postfix'
)
}
end
end
spec/fixtures/manifests/site.pp
0 → 100644
View file @
cd0090f0
spec/spec_helper.rb
0 → 100644
View file @
cd0090f0
require
'mocha'
require
'rspec-puppet'
require
'puppetlabs_spec_helper/module_spec_helper'
templates/master.cf.debian.erb
View file @
cd0090f0
...
...
@@ -8,11 +8,11 @@
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
<%
if
has_variable?
(
'postfix_master_smtp'
)
-%>
<%=
postfix_master_smtp
%>
<%
elsif
postfix
_
smtp_listen
==
'all'
-%>
<%=
@
postfix_master_smtp
%>
<%
elsif
scope
.
lookupvar
(
'
postfix
::
smtp_listen
'
)
==
'all'
-%>
smtp inet n - - - - smtpd
<%
else
-%>
<%=
postfix
_
smtp_listen
%>
:smtp inet n - - - - smtpd
<%=
scope
.
lookupvar
(
'
postfix
::
smtp_listen
'
)
%>
:smtp inet n - - - - smtpd
<%
end
-%>
<%
if
has_variable?
(
'postfix_master_submission'
)
-%>
<%=
postfix_master_submission
%>
...
...
@@ -68,7 +68,7 @@ scache unix - - - - 1 scache
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop unix - n n - - pipe
flags=DRhu user=
<%=
postfix
_
mail_user
%>
argv=/usr/bin/maildrop -d ${recipient}
flags=DRhu user=
<%=
scope
.
lookupvar
(
'
postfix
::
mail_user
'
)
%>
argv=/usr/bin/maildrop -d ${recipient}
#
# See the Postfix UUCP_README file for configuration details.
#
...
...
templates/master.cf.redhat.erb
View file @
cd0090f0
...
...
@@ -7,10 +7,10 @@
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
<%
if
postfix
_
smtp_listen
==
'all'
-%>
<%
if
scope
.
lookupvar
(
'
postfix
::
smtp_listen
'
)
==
'all'
-%>
smtp inet n - n - - smtpd
<%
else
-%>
<%=
postfix
_
smtp_listen
%>
:smtp inet n - n - - smtpd
<%=
scope
.
lookupvar
(
'
postfix
::
smtp_listen
'
)
%>
:smtp inet n - n - - smtpd
<%
end
-%>
#smtp inet n - n - - smtpd
#submission inet n - n - - smtpd
...
...
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