summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-11-29 00:23:21 -0200
committerSilvio Rhatto <rhatto@riseup.net>2011-11-29 00:23:21 -0200
commit235caa63ec1d56ee63afec6a71acad2169f12b3c (patch)
tree84953c2c0704b3691d5c5b5bb22315d44cc756eb /manifests
parent2a71be949e7ed1b65d30c074d6e8673295dedf4e (diff)
downloadpuppet-apache-235caa63ec1d56ee63afec6a71acad2169f12b3c.tar.gz
puppet-apache-235caa63ec1d56ee63afec6a71acad2169f12b3c.tar.bz2
Adding SSL suport
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp23
1 files changed, 22 insertions, 1 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 4c1b284..205b11f 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -31,6 +31,8 @@ $apache2_macros = "/etc/apache2/conf.d/macros"
$apache2_conf = "/etc/apache2/apache2.conf"
class apache {
+ include ssl
+
case $apache_www_folder {
'': { $apache_www_folder = "/var/www" }
}
@@ -84,6 +86,11 @@ class apache {
require => Package["apache"],
}
+ module { "ssl":
+ ensure => present,
+ require => Package["apache"],
+ }
+
# apache mod_macro configuration
file { "${apache2_macros}":
ensure => present,
@@ -139,7 +146,8 @@ class apache {
$manage_docroot = true, $owner = 'root', $group = 'root',
$mpm = true, $mpm_user = '', $mpm_group = '', $password = '*',
$comment = '', $sshkey = absent,
- $groups = '', $shell = '/bin/false', $manage_user = true) {
+ $groups = '', $shell = '/bin/false', $manage_user = true,
+ $ssl = false, $listen = '*') {
$vhost = $filename ? {
'' => "$title",
@@ -202,6 +210,19 @@ class apache {
}
}
+ if $ssl == true {
+ ssl::cert { "$name":
+ group => $gid,
+ privmode => '0640',
+ ensure => $ensure,
+ }
+
+ ssl::check { "$name":
+ file => "/etc/ssl/certs/$name.crt",
+ ensure => $ensure,
+ }
+ }
+
case $source {
true: {
file { "${apache2_sites}-available/$vhost":