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
37988a6b
Commit
37988a6b
authored
Aug 10, 2010
by
Marc Fournier
Browse files
postfix: squeeze fix - replace broken exec by augeas resources.
parent
512834f0
Changes
2
Hide whitespace changes
Inline
Side-by-side
manifests/classes/postfix-mailman.pp
View file @
37988a6b
...
...
@@ -22,7 +22,7 @@ class postfix::mailman {
"mydestination"
:
value
=>
""
;
"virtual_alias_maps"
:
value
=>
"hash:/etc/postfix/virtual"
;
"transport_maps"
:
value
=>
"hash:/etc/postfix/transport"
;
"mailman_destination_recipient_limit"
:
value
=>
"1"
,
nonstandard
=>
true
;
"mailman_destination_recipient_limit"
:
value
=>
"1"
;
}
postfix::hash
{
"/etc/postfix/virtual"
:
...
...
manifests/definitions/config.pp
View file @
37988a6b
...
...
@@ -8,8 +8,6 @@ Parameters:
-
*
name
*
:
name
of
the
parameter
.
-
*
ensure
*
:
present
/
absent
.
defaults
to
present
.
-
*
value
*
:
value
of
the
parameter
.
-
*
nonstandard
*
:
inform
postfix::config
that
this
parameter
is
not
recognized
by
the
"postconf"
command
.
defaults
to
false
.
Requires
:
-
Class
[
"postfix"
]
...
...
@@ -29,21 +27,25 @@ Example usage:
}
*/
define
postfix::config
(
$ensure
=
present
,
$value
,
$nonstandard
=
false
)
{
define
postfix::config
(
$ensure
=
present
,
$value
)
{
Augeas
{
context
=>
"/files/etc/postfix/main.cf"
,
notify
=>
Service
[
"postfix"
],
require
=>
File
[
"/etc/postfix/main.cf"
],
}
case
$ensure
{
present
:
{
exec
{
"postconf -e
${name}
='
${value}
'"
:
unless
=>
$nonstandard
?
{
false
=>
"test
\"
x
$
(postconf -h
${name}
)
\"
== 'x
${value}
'"
,
true
=>
"test
\"
x
$
(egrep '^
${name}
' /etc/postfix/main.cf | cut -d= -f2 | cut -d' ' -f2)
\"
== 'x
${value}
'"
,
},
notify
=>
Service
[
"postfix"
],
require
=>
File
[
"/etc/postfix/main.cf"
],
augeas
{
"set postfix
$name
to
$value
"
:
changes
=>
"set
$name
$value
"
,
}
}
absent
:
{
fail
"postfix::config ensure => absent: Not implemented"
augeas
{
"set postfix
$name
to
$value
"
:
changes
=>
"rm
$name
"
,
}
}
}
}
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