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

Diff of /puppet/modules/apache/manifests/init.pp

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

revision 908 by misc, Fri Jan 28 12:26:04 2011 UTC revision 928 by misc, Tue Feb 1 12:44:50 2011 UTC
# Line 96  class apache { Line 96  class apache {
96          }          }
97      }      }
98    
99      define vhost_redirect_ssl() {      define vhost_base($content = '',
100          file { "redirect_ssl_$name.conf":                        $location = '/dev/null',
101              path => "/etc/httpd/conf/vhosts.d/redirect_ssl_$name.conf",                        $use_ssl = false,
102              ensure => "present",                        $vhost = false) {
103              owner => root,          if ! $vhost {
104              group => root,              $real_vhost = $name
105              mode => 644,          } else {
106              notify => Service['apache'],              $real_vhost = $vhost
             content => template("apache/vhost_ssl_redirect.conf")  
107          }          }
     }  
   
     define vhost_catalyst_app($script, $location = '', $process = 4, $use_ssl = false) {  
   
         include apache::mod_fastcgi  
108    
109          if $use_ssl {          if $use_ssl {
110              include apache::mod_ssl              include apache::mod_ssl
111              openssl::self_signed_cert{ "$name":              openssl::self_signed_cert{ "$name":
112                  directory => "/etc/ssl/apache/",                  directory => "/etc/ssl/apache/",
113                  before => File["$name.conf"],                  before => File["$filename"],
114              }              }
115          }          }
116    
117          file { "$name.conf":          $filename = "$name.conf"
118              path => "/etc/httpd/conf/vhosts.d/$name.conf",          file { "$filename":
119                path => "/etc/httpd/conf/vhosts.d/$filename",
120              ensure => "present",              ensure => "present",
121              owner => root,              owner => root,
122              group => root,              group => root,
123              mode => 644,              mode => 644,
124              notify => Service['apache'],              notify => Service['apache'],
125                content => template("apache/vhost_base.conf")
126            }
127        }
128    
129        define vhost_redirect_ssl() {
130            vhost_base { "redirect_ssl_$name":
131                vhost => $name,
132                content => template("apache/vhost_ssl_redirect.conf")
133            }
134        }
135    
136        define vhost_catalyst_app($script, $location = '', $process = 4, $use_ssl = false) {
137    
138            include apache::mod_fastcgi
139            vhost_base { $name:
140                use_ssl => $use_ssl,
141              content => template("apache/vhost_catalyst_app.conf")              content => template("apache/vhost_catalyst_app.conf")
142          }          }
143      }      }
144    
145      define vhost_django_app($module = false, $module_path = false, $use_ssl = false) {      define vhost_django_app($module = false, $module_path = false, $use_ssl = false) {
146          include apache::mod_wsgi          include apache::mod_wsgi
147            vhost_base { $name:
148          if $use_ssl {              content => template("apache/vhost_django_app.conf")
             include apache::mod_ssl  
             openssl::self_signed_cert{ "$name":  
                 directory => "/etc/ssl/apache/",  
                 before => File["$name.conf"],  
             }  
149          }          }
150            
151          # module is a ruby reserved keyword, cannot be used in templates          # module is a ruby reserved keyword, cannot be used in templates
152          $django_module = $module          $django_module = $module
         file { "$name.conf":  
             path => "/etc/httpd/conf/vhosts.d/$name.conf",  
             ensure => "present",  
             owner => root,  
             group => root,  
             mode => 644,  
             notify => Service['apache'],  
             content => template("apache/vhost_django_app.conf")  
         }  
   
         # fichier django wsgi  
153          file { "$name.wsgi":          file { "$name.wsgi":
154              path => "/usr/local/lib/wsgi/$name.wsgi",              path => "/usr/local/lib/wsgi/$name.wsgi",
155              ensure => "present",              ensure => "present",
# Line 194  class apache { Line 189  class apache {
189    
190      define vhost_simple($location) {      define vhost_simple($location) {
191          include apache::base          include apache::base
192          file { "$name.conf":          vhost_base { $name:
193              path => "/etc/httpd/conf/vhosts.d/$name.conf",              location => $location,
194              ensure => "present",          }
             owner => root,  
             group => root,  
             mode => 644,  
             notify => Service['apache'],  
             content => template("apache/vhost_simple.conf")  
         }  
195      }      }
196    
197      define vhost_reverse_proxy($url) {      define vhost_reverse_proxy($url) {
198          include apache::mod_proxy          include apache::mod_proxy
199          file { "$name.conf":          vhost_base { $name:
             path => "/etc/httpd/conf/vhosts.d/$name.conf",  
             ensure => "present",  
             owner => root,  
             group => root,  
             mode => 644,  
             notify => Service['apache'],  
200              content => template("apache/vhost_reverse_proxy.conf")              content => template("apache/vhost_reverse_proxy.conf")
201          }          }
202      }      }
203    
204     define webapp_other($webapp_file) {     define webapp_other($webapp_file) {

Legend:
Removed from v.908  
changed lines
  Added in v.928

  ViewVC Help
Powered by ViewVC 1.1.30