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
b139cac8
Commit
b139cac8
authored
Jan 19, 2015
by
Raphaël Pinson
Browse files
Simplify relationships and avoid spaceship operators
parent
a863c1b3
Changes
3
Hide whitespace changes
Inline
Side-by-side
manifests/config.pp
View file @
b139cac8
...
...
@@ -42,28 +42,27 @@ define postfix::config ($value = undef, $ensure = 'present') {
fail
'You must define class postfix before using postfix::config!'
}
Augeas
{
incl
=>
'/etc/postfix/main.cf'
,
lens
=>
'Postfix_Main.lns'
,
require
=>
File
[
'/etc/postfix/main.cf'
],
}
case
$ensure
{
'present'
:
{
augeas
{
"set postfix '
${name}
' to '
${value}
'"
:
changes
=>
"set
${name}
'
${value}
'"
,
}
$changes
=
"set
${name}
'
${value}
'"
}
'absent'
:
{
augeas
{
"rm postfix '
${name}
'"
:
changes
=>
"rm
${name}
"
,
}
$changes
=
"rm
${name}
"
}
'blank'
:
{
augeas
{
"blank postfix '
${name}
'"
:
changes
=>
"clear
${name}
"
,
}
$changes
=
"clear
${name}
"
}
default
:
{
fail
"Unknown value for ensure '
${ensure}
'"
}
default
:
{}
}
augeas
{
"manage postfix '
${title}
'"
:
incl
=>
'/etc/postfix/main.cf'
,
lens
=>
'Postfix_Main.lns'
,
changes
=>
$changes
,
require
=>
File
[
'/etc/postfix/main.cf'
],
}
Postfix
::
Config
[
$title
]
~>
Class
[
'postfix::service'
]
}
manifests/hash.pp
View file @
b139cac8
...
...
@@ -70,4 +70,6 @@ define postfix::hash (
subscribe
=>
File
[
$name
],
refreshonly
=>
true
,
}
Class
[
'postfix'
]
->
Postfix
::
Hash
[
$title
]
}
manifests/init.pp
View file @
b139cac8
...
...
@@ -162,8 +162,4 @@ class postfix (
if
$mailman
{
include
::postfix::mailman
}
# Relationships
Postfix
::
Config
<|
|>
~>
Class
[
'postfix::service'
]
Class
[
'postfix'
]
->
Postfix
::
Hash
<|
|>
}
Write
Preview
Markdown
is supported
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