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
be33e7ef
Commit
be33e7ef
authored
Mar 25, 2015
by
Mickaël Canévet
Browse files
Merge pull request #78 from smithtrevor/systemd_restart_support
Systemd restart support
parents
32ebb5d2
cd2a6f8d
Changes
3
Hide whitespace changes
Inline
Side-by-side
manifests/params.pp
View file @
be33e7ef
...
@@ -7,6 +7,11 @@ class postfix::params {
...
@@ -7,6 +7,11 @@ class postfix::params {
default
=>
undef
,
default
=>
undef
,
}
}
$restart_cmd
=
$::operatingsystemmajrelease
?
{
'7'
=>
'/bin/systemctl reload postfix'
,
default
=>
'/etc/init.d/postfix reload'
,
}
$mailx_package
=
'mailx'
$mailx_package
=
'mailx'
$master_os_template
=
"
${module_name}
/master.cf.redhat.erb"
$master_os_template
=
"
${module_name}
/master.cf.redhat.erb"
...
@@ -15,6 +20,8 @@ class postfix::params {
...
@@ -15,6 +20,8 @@ class postfix::params {
'Debian'
:
{
'Debian'
:
{
$seltype
=
undef
$seltype
=
undef
$restart_cmd
=
'/etc/init.d/postfix reload'
$mailx_package
=
$::lsbdistcodename
?
{
$mailx_package
=
$::lsbdistcodename
?
{
/sarge|etch|lenny/
=>
'mailx'
,
/sarge|etch|lenny/
=>
'mailx'
,
default
=>
'bsd-mailx'
,
default
=>
'bsd-mailx'
,
...
@@ -26,6 +33,8 @@ class postfix::params {
...
@@ -26,6 +33,8 @@ class postfix::params {
'Suse'
:
{
'Suse'
:
{
$seltype
=
undef
$seltype
=
undef
$restart_cmd
=
'/etc/init.d/postfix reload'
$mailx_package
=
'mailx'
$mailx_package
=
'mailx'
if
$::operatingsystem
!=
'SLES'
{
if
$::operatingsystem
!=
'SLES'
{
...
...
manifests/service.pp
View file @
be33e7ef
...
@@ -3,6 +3,6 @@ class postfix::service {
...
@@ -3,6 +3,6 @@ class postfix::service {
ensure
=>
running
,
ensure
=>
running
,
enable
=>
true
,
enable
=>
true
,
hasstatus
=>
true
,
hasstatus
=>
true
,
restart
=>
'/etc/init.d/postfix reload'
,
restart
=>
$::postfix::params::restart_cmd
,
}
}
}
}
spec/classes/postfix_spec.rb
View file @
be33e7ef
...
@@ -67,7 +67,7 @@ describe 'postfix' do
...
@@ -67,7 +67,7 @@ describe 'postfix' do
:ensure
=>
'running'
,
:ensure
=>
'running'
,
:enable
=>
'true'
,
:enable
=>
'true'
,
:hasstatus
=>
'true'
,
:hasstatus
=>
'true'
,
:restart
=>
'/
etc/init.d/postfix reload
'
:restart
=>
'/
bin/systemctl reload postfix
'
)
}
)
}
end
end
end
end
...
...
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