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
c8253b6e
Commit
c8253b6e
authored
Aug 09, 2017
by
treydock
Committed by
Raphaël Pinson
Aug 09, 2017
Browse files
Do not generate postmap when postfix::map ensure is absent (#178)
parent
8bc88588
Changes
2
Hide whitespace changes
Inline
Side-by-side
manifests/map.pp
View file @
c8253b6e
...
...
@@ -47,7 +47,11 @@ define postfix::map (
if
$type
=~
/^
(
cidr|pcre
)
$/
{
$manage_notify
=
Service
[
'postfix'
]
}
else
{
$manage_notify
=
Exec
[
"generate
${name}
.db"
]
if
$ensure
==
'present'
{
$manage_notify
=
Exec
[
"generate
${name}
.db"
]
}
else
{
$manage_notify
=
undef
}
}
file
{
"postfix map
${name}
"
:
...
...
spec/defines/postfix_map_spec.rb
View file @
c8253b6e
...
...
@@ -91,6 +91,7 @@ describe 'postfix::map' do
}
}
it
{
is_expected
.
to
contain_file
(
'postfix map foo'
).
with_ensure
(
'absent'
)
}
it
{
is_expected
.
to
contain_file
(
'postfix map foo'
).
without_notify
}
it
{
is_expected
.
to
contain_file
(
'postfix map foo.db'
).
with_ensure
(
'absent'
)
}
it
{
is_expected
.
to
contain_exec
(
'generate foo.db'
)
}
end
...
...
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