From 688f07793a72ba4453f6663b6d19fe6388ba382f Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Thu, 18 Apr 2013 16:36:48 -0400 Subject: add a 'ssl' parameter, so you do not need to include two classes to get ssl support, you can simply just pass the 'ssl => true'. this may also help the occasional warning: warning: Scope(Class[Apache::Ssl]): Could not look up qualified variable 'apache::manage_shorewall'; class apache has not been evaluated at /srv/leap/puppet/modules/apache/manifests/ssl.pp:10 --- README | 10 +++++----- manifests/init.pp | 6 +++++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/README b/README index ff6d338..b723a54 100644 --- a/README +++ b/README @@ -77,18 +77,18 @@ class to have the module do some things for you: 0-default_ssl.conf virtualhosts automatically created in your node configuration. (Default: false) + * ssl: If you want to install Apache SSL support enabled, just pass this + parameter (Default: false) + For example: class { 'apache': manage_shorewall => true, manage_munin => true, - no_default_site => true + no_default_site => true, + ssl => true } -If you want to install Apache and also enable SSL support: - - include apache::ssl - You can install the ITK worker model to enforce stronger, per-user security: include apache::itk diff --git a/manifests/init.pp b/manifests/init.pp index 574c212..542e7aa 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -17,7 +17,8 @@ class apache( $cluster_node = '', $manage_shorewall = false, $manage_munin = false, - $no_default_site = false + $no_default_site = false, + $ssl = false ) { case $::operatingsystem { centos: { include apache::centos } @@ -32,5 +33,8 @@ class apache( if $apache::manage_shorewall { include shorewall::rules::http } + if $ssl { + include apache::ssl + } } -- cgit v1.2.3 From 090e59ad1fcba01e868237a83cadf9254cf09d3e Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Thu, 25 Apr 2013 14:34:20 -0400 Subject: fix merge conflict resolution mistake --- manifests/debian.pp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/manifests/debian.pp b/manifests/debian.pp index 9180825..d009e25 100644 --- a/manifests/debian.pp +++ b/manifests/debian.pp @@ -19,11 +19,15 @@ class apache::debian inherits apache::package { path => '/var/www/index.html', } file { 'apache_main_config': - path => "${config_dir}/apache2.conf", - source => [ "puppet:///modules/site_apache/config/Debian/{$::fqdn}/apache2.conf", + path => "${config_dir}/apache2.conf", + source => [ "puppet:///modules/site_apache/config/Debian.${::lsbdistcodename}/${::fqdn}/apache2.conf", + "puppet:///modules/site_apache/config/Debian/${::fqdn}/apache2.conf", "puppet:///modules/site_apache/config/Debian.${::lsbdistcodename}/apache2.conf", - "puppet:///modules/site_apache/config/Debian/apache2.conf", - "puppet:///modules/apache/config/Debian/apache2.conf" ], + 'puppet:///modules/site_apache/config/Debian/apache2.conf', + "puppet:///modules/apache/config/Debian.${::lsbdistcodename}/${::fqdn}/apache2.conf", + "puppet:///modules/apache/config/Debian/${::fqdn}/apache2.conf", + "puppet:///modules/apache/config/Debian.${::lsbdistcodename}/apache2.conf", + 'puppet:///modules/apache/config/Debian/apache2.conf' ], require => Package['apache'], notify => Service['apache'], owner => root, -- cgit v1.2.3 From c3e92a9b3cb02f1546b6b1570f10a968d380005c Mon Sep 17 00:00:00 2001 From: elijah Date: Sun, 19 May 2013 12:32:30 -0700 Subject: fixed typo that caused 0-default_ssl.conf to always be created. --- manifests/ssl/base.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/ssl/base.pp b/manifests/ssl/base.pp index ff9baa5..7c17423 100644 --- a/manifests/ssl/base.pp +++ b/manifests/ssl/base.pp @@ -1,7 +1,7 @@ class apache::ssl::base { ::apache::config::include{ 'ssl_defaults.inc': } - if !$apache_no_default_site { + if !$apache::no_default_site { ::apache::vhost::file{ '0-default_ssl': } } } -- cgit v1.2.3