Skip to content

Commit f1fda7d

Browse files
committed
clean up and documentation
1 parent 99f1f9a commit f1fda7d

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

manifests/map.pp

+25-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
#
2-
# a table used in postfix
2+
# A lookup table to be used in postfix
3+
#
4+
# Parameters:
5+
# - The $source file to copy the map contents from
6+
# - The $content of the map
7+
# - The type of the map. May be one of 'hash', 'btree', 'cdb', 'dbm'. Default
8+
# is 'hash', valid values depend on the database libraries installed on the
9+
# machine
10+
#
11+
# sample usage:
12+
# postfix::map { '/etc/aliases':
13+
# source => 'puppet:///modules/site/mail.aliases',
14+
# }
15+
#
16+
#
17+
# If neither $source nor $content are given, the input file for the map is assumed
18+
# to be created by some other procces on the target machine.
19+
# A common use case is to combine this with a metaparameter like this:
20+
#
21+
# postfix::map { '/etc/postfix/external_mailinglists':
22+
# subscribe => Exec['/etc/postfix/create_exml.sh'],
23+
# }
24+
#
25+
# If the input file does not exist yet, it will be created with dummy content.
326
#
427
define postfix::map (
528
$source = undef,
@@ -11,7 +34,7 @@
1134
#
1235

1336
if (! $source) and (!$content) {
14-
warning("As neither source nor contents attribute are set a dummy content will be created for postfix::map ${name}")
37+
warning("As neither source nor contents attribute are set a dummy content may be created for postfix::map ${name}")
1538
}
1639

1740
case $type {

tests/map.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
postfix::map { '/etc/aliases':
55
content => "we: me,you,him,her,[email protected]",
66
type => 'hash'
7-
}
7+
}

0 commit comments

Comments
 (0)