/[adm]/puppet/modules/apache/manifests/vhost/base.pp
ViewVC logotype

Annotation of /puppet/modules/apache/manifests/vhost/base.pp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2693 - (hide annotations) (download)
Sun Mar 25 13:17:26 2012 UTC (12 years, 1 month ago) by misc
File size: 1503 byte(s)
fix syntax, and properly indent the file
1 misc 2689 define apache::vhost::base ($content = '',
2     $location = '/dev/null',
3     $use_ssl = false,
4     $vhost = false,
5     $aliases = {},
6     $server_aliases = [],
7     $access_logfile = false,
8     $error_logfile = false,
9     $options = [],
10     $enable_public_html = false) {
11 misc 2693 include apache::base
12     $httpd_logdir = '/var/log/httpd'
13     $filename = "$name.conf"
14 misc 2689
15 misc 2693 if ! $vhost {
16     $real_vhost = $name
17     } else {
18     $real_vhost = $vhost
19     }
20 misc 2689
21 misc 2693 if ! $access_logfile {
22     $real_access_logfile = "$httpd_logdir/${real_vhost}-access_log"
23     } else {
24     $real_access_logfile = $access_logfile
25     }
26     if ! $error_logfile {
27     $real_error_logfile = "$httpd_logdir/${real_vhost}-error_log"
28     } else {
29     $real_error_logfile = $error_logfile
30     }
31 misc 2689
32 misc 2693 if $use_ssl {
33     include apache::mod::ssl
34     if $wildcard_sslcert != true {
35     openssl::self_signed_cert{ $real_vhost:
36     directory => '/etc/ssl/apache/',
37     before => Apache::Config["/etc/httpd/conf/vhosts.d/$filename"],
38 misc 2689 }
39     }
40 misc 2693 }
41 misc 2689
42 misc 2693 if $enable_public_html {
43     include apache::mod::public_html
44     }
45 misc 2689
46 misc 2693 apache::config { "/etc/httpd/conf/vhosts.d/$filename":
47     content => template('apache/vhost_base.conf')
48 misc 2689 }
49     }
50 misc 2693

  ViewVC Help
Powered by ViewVC 1.1.30