]> gitweb.fluxo.info Git - puppet-nginx.git/commitdiff
Use parametrized classes
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 22 May 2015 21:40:02 +0000 (18:40 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 22 May 2015 21:40:02 +0000 (18:40 -0300)
manifests/base.pp
manifests/init.pp

index e2f3f1356d77dc66b26b998470ec22755dc1ad87..3caaeaa51846457b475129e2712152a702df6d40 100644 (file)
@@ -1,11 +1,5 @@
 # Base class
 class nginx::base {
-
-  $ssl = $nginx_ssl ? {
-    false   => false,
-    default => true,
-  }
-
   # Setup packages
   package { "nginx": ensure => installed, }
 
index 8eca62e29cb56e9cbd665b8f0f87ec602471a9b1..eaeea8aa74731a1d028450a7e0ee8f89d8afdf80 100644 (file)
 # You should have received a copy of the GNU Affero General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-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'],