From d0e87a428f8fa9a6e6463751e07663848d282f3e Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 22 May 2015 18:40:02 -0300 Subject: Use parametrized classes --- manifests/base.pp | 6 ------ manifests/init.pp | 10 ++++++---- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/manifests/base.pp b/manifests/base.pp index e2f3f13..3caaeaa 100644 --- a/manifests/base.pp +++ b/manifests/base.pp @@ -1,11 +1,5 @@ # Base class class nginx::base { - - $ssl = $nginx_ssl ? { - false => false, - default => true, - } - # Setup packages package { "nginx": ensure => installed, } diff --git a/manifests/init.pp b/manifests/init.pp index 8eca62e..eaeea8a 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -16,11 +16,13 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -class nginx inherits nginx::base { - case $ssl { - true: { - include ssl +class nginx inherits nginx::base( + $deploy_certs = true +) { + include ssl + case $deploy_certs { + true: { ssl::cert { "$::domain": main => true, notify => Service['nginx'], -- cgit v1.2.3