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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2692 by misc, Sun Mar 25 12:47:17 2012 UTC revision 2693 by misc, Sun Mar 25 13:17:26 2012 UTC
# Line 8  define apache::vhost::base ($content = ' Line 8  define apache::vhost::base ($content = '
8                              $error_logfile = false,                              $error_logfile = false,
9                              $options = [],                              $options = [],
10                              $enable_public_html = false) {                              $enable_public_html = false) {
11          include apache::base      include apache::base
12          $httpd_logdir = '/var/log/httpd'      $httpd_logdir = '/var/log/httpd'
13          $filename = "$name.conf"      $filename = "$name.conf"
   
         if ! $vhost {  
             $real_vhost = $name  
         } else {  
             $real_vhost = $vhost  
         }  
14    
15          if ! $access_logfile {      if ! $vhost {
16              $real_access_logfile = "$httpd_logdir/${real_vhost}-access_log"          $real_vhost = $name
17          } else {      } else {
18              $real_access_logfile = $access_logfile          $real_vhost = $vhost
19          }      }
20          if ! $error_logfile {  
21              $real_error_logfile = "$httpd_logdir/${real_vhost}-error_log"      if ! $access_logfile {
22          } else {          $real_access_logfile = "$httpd_logdir/${real_vhost}-access_log"
23              $real_error_logfile = $error_logfile      } 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    
32          if $use_ssl {      if $use_ssl {
33              include apache::mod::ssl          include apache::mod::ssl
34              if $wildcard_sslcert != true {          if $wildcard_sslcert != true {
35                  openssl::self_signed_cert{ $real_vhost:              openssl::self_signed_cert{ $real_vhost:
36                      directory => '/etc/ssl/apache/',                  directory => '/etc/ssl/apache/',
37                      before    => Apache::Config["/etc/httpd/conf/vhosts.d/$filename"],                  before    => Apache::Config["/etc/httpd/conf/vhosts.d/$filename"],
                 }  
38              }              }
39          }          }
40        }
41    
42          if $enable_public_html {      if $enable_public_html {
43              include apache::mod::public_html          include apache::mod::public_html
44          }      }
45    
46          apache::config { "/etc/httpd/conf/vhosts.d/$filename":      apache::config { "/etc/httpd/conf/vhosts.d/$filename":
47              content => template('apache/vhost_base.conf')          content => template('apache/vhost_base.conf')
         }  
48      }      }
49  }  }
50    

Legend:
Removed from v.2692  
changed lines
  Added in v.2693

  ViewVC Help
Powered by ViewVC 1.1.30