59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
# File 'manifests/vhost/fragment.pp', line 59
define apache::vhost::fragment (
String[1] $vhost,
Optional[Stdlib::Port] $port = undef,
Optional[Apache::Vhost::Priority] $priority = undef,
Optional[String] $content = undef,
Integer[0] $order = 900,
) {
# This copies the logic from apache::vhost
if $priority {
$priority_real = "${priority}-"
} elsif $priority == false {
$priority_real = ''
} else {
$priority_real = '25-'
}
$filename = $port ? {
Integer => regsubst("${vhost}-${port}", ' ', '_', 'G'),
Undef => regsubst($vhost, ' ', '_', 'G'),
}
if $content =~ String[1] {
concat::fragment { "${vhost}-${title}":
target => "${priority_real}${filename}.conf",
order => $order,
content => $content,
}
}
}
|