Skip to content
GitLab
Menu
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
{
class
postfix::params
{
case
$::osfamily
{
case
$::osfamily
{
'RedHat'
:
{
'RedHat'
:
{
$seltype
=
$::lsbmajdistrelease
{
$seltype
=
$::lsbmajdistrelease
?
{
'4'
=>
'etc_t'
,
'4'
=>
'etc_t'
,
'5'
,
'6'
=>
'postfix_etc_t'
,
/5|6/
=>
'postfix_etc_t'
,
default
=>
undef
,
default
=>
undef
,
}
}
...
@@ -13,7 +13,7 @@ class postfix::params {
...
@@ -13,7 +13,7 @@ class postfix::params {
}
}
'Debian'
:
{
'Debian'
:
{
$seltype
=
undef
,
$seltype
=
undef
$mailx_package
=
$::lsbdistcodename
?
{
$mailx_package
=
$::lsbdistcodename
?
{
/sarge|etch|lenny|lucid/
=>
'mailx'
,
/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 @@
...
@@ -8,11 +8,11 @@
# (yes) (yes) (yes) (never) (100)
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
# ==========================================================================
<%
if
has_variable?
(
'postfix_master_smtp'
)
-%>
<%
if
has_variable?
(
'postfix_master_smtp'
)
-%>
<%=
postfix_master_smtp
%>
<%=
@
postfix_master_smtp
%>
<%
elsif
postfix
_
smtp_listen
==
'all'
-%>
<%
elsif
scope
.
lookupvar
(
'
postfix
::
smtp_listen
'
)
==
'all'
-%>
smtp inet n - - - - smtpd
smtp inet n - - - - smtpd
<%
else
-%>
<%
else
-%>
<%=
postfix
_
smtp_listen
%>
:smtp inet n - - - - smtpd
<%=
scope
.
lookupvar
(
'
postfix
::
smtp_listen
'
)
%>
:smtp inet n - - - - smtpd
<%
end
-%>
<%
end
-%>
<%
if
has_variable?
(
'postfix_master_submission'
)
-%>
<%
if
has_variable?
(
'postfix_master_submission'
)
-%>
<%=
postfix_master_submission
%>
<%=
postfix_master_submission
%>
...
@@ -68,7 +68,7 @@ scache unix - - - - 1 scache
...
@@ -68,7 +68,7 @@ scache unix - - - - 1 scache
# Also specify in main.cf: maildrop_destination_recipient_limit=1
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
#
maildrop unix - n n - - pipe
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.
# See the Postfix UUCP_README file for configuration details.
#
#
...
...
templates/master.cf.redhat.erb
View file @
cd0090f0
...
@@ -7,10 +7,10 @@
...
@@ -7,10 +7,10 @@
# service type private unpriv chroot wakeup maxproc command + args
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
# ==========================================================================
<%
if
postfix
_
smtp_listen
==
'all'
-%>
<%
if
scope
.
lookupvar
(
'
postfix
::
smtp_listen
'
)
==
'all'
-%>
smtp inet n - n - - smtpd
smtp inet n - n - - smtpd
<%
else
-%>
<%
else
-%>
<%=
postfix
_
smtp_listen
%>
:smtp inet n - n - - smtpd
<%=
scope
.
lookupvar
(
'
postfix
::
smtp_listen
'
)
%>
:smtp inet n - n - - smtpd
<%
end
-%>
<%
end
-%>
#smtp inet n - n - - smtpd
#smtp inet n - n - - smtpd
#submission inet n - n - - smtpd
#submission inet n - n - - smtpd
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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