diff options
author | Michael Scherer <misc@mageia.org> | 2012-03-25 13:22:05 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2012-03-25 13:22:05 +0000 |
commit | 2f8b0454ea819d00579bb4b1b26de0b3bd5da7ef (patch) | |
tree | b37f3336e27162dfd05b6b502480ff2657e13c2c | |
parent | 45cbc0000bbebd81c9946fbcc04371d85b0ca8fe (diff) | |
download | puppet-2f8b0454ea819d00579bb4b1b26de0b3bd5da7ef.tar puppet-2f8b0454ea819d00579bb4b1b26de0b3bd5da7ef.tar.gz puppet-2f8b0454ea819d00579bb4b1b26de0b3bd5da7ef.tar.bz2 puppet-2f8b0454ea819d00579bb4b1b26de0b3bd5da7ef.tar.xz puppet-2f8b0454ea819d00579bb4b1b26de0b3bd5da7ef.zip |
split 2 more vhost class
-rw-r--r-- | modules/apache/manifests/init.pp | 25 | ||||
-rw-r--r-- | modules/apache/manifests/vhost/django_app.pp | 22 | ||||
-rw-r--r-- | modules/apache/manifests/vhost/other_app.pp | 6 |
3 files changed, 28 insertions, 25 deletions
diff --git a/modules/apache/manifests/init.pp b/modules/apache/manifests/init.pp index d97345e7..9318a51c 100644 --- a/modules/apache/manifests/init.pp +++ b/modules/apache/manifests/init.pp @@ -9,31 +9,6 @@ class apache { } } - define vhost_django_app($module = false, $module_path = false, $use_ssl = false, $aliases= {}) { - include apache::mod::wsgi - apache::vhost::base { $name: - use_ssl => $use_ssl, - content => template("apache/vhost_django_app.conf"), - aliases => $aliases, - } - - # module is a ruby reserved keyword, cannot be used in templates - $django_module = $module - file { "$name.wsgi": - path => "/usr/local/lib/wsgi/$name.wsgi", - mode => 755, - notify => Service['apache'], - content => template("apache/django.wsgi"), - } - } - - define vhost_other_app($vhost_file) { - include apache::base - apache::config { "/etc/httpd/conf/vhosts.d/$name.conf": - content => template($vhost_file), - } - } - define vhost_simple($location) { include apache::base apache::vhost::base { $name: diff --git a/modules/apache/manifests/vhost/django_app.pp b/modules/apache/manifests/vhost/django_app.pp new file mode 100644 index 00000000..5613e384 --- /dev/null +++ b/modules/apache/manifests/vhost/django_app.pp @@ -0,0 +1,22 @@ +define apache::vhost::django_app ($module = false, + $module_path = false, + $use_ssl = false, + $aliases= {}) { + include apache::mod::wsgi + apache::vhost::base { $name: + use_ssl => $use_ssl, + content => template('apache/vhost_django_app.conf'), + aliases => $aliases, + } + + # module is a ruby reserved keyword, cannot be used in templates + $django_module = $module + file { "$name.wsgi": + path => "/usr/local/lib/wsgi/$name.wsgi", + mode => '0755', + notify => Service['apache'], + content => template('apache/django.wsgi'), + } +} + + diff --git a/modules/apache/manifests/vhost/other_app.pp b/modules/apache/manifests/vhost/other_app.pp new file mode 100644 index 00000000..69b3ec56 --- /dev/null +++ b/modules/apache/manifests/vhost/other_app.pp @@ -0,0 +1,6 @@ +define apache::vhost::other_app($vhost_file) { + include apache::base + apache::config { "/etc/httpd/conf/vhosts.d/$name.conf": + content => template($vhost_file), + } +} |