26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# File 'manifests/alias.pp', line 26
define postfix::alias (
$to,
$in = '/etc/aliases',
$order = '50'
) {
# Check whether the title has to be split into an alias and file path.
if $title =~ / in / {
$alias = regsubst($title, '^(.*) in (.*)$', '\1')
$target = regsubst($title, '^(.*) in (.*)$', '\2')
} else {
$alias = $title
$target = $in
}
# Create the alias.
concat::fragment { "${alias}_${alias_file}":
target => $target,
order => $order,
content => "${alias}: ${to}"
}
}
|