diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2015-05-22 18:40:02 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2015-05-22 18:40:02 -0300 |
commit | d0e87a428f8fa9a6e6463751e07663848d282f3e (patch) | |
tree | ac55da4d12ab4e715a1305269ef4c5fb20ae3b36 /manifests | |
parent | 524d5beb6d196c15cb6f0786add81241ac39ec00 (diff) | |
download | puppet-nginx-d0e87a428f8fa9a6e6463751e07663848d282f3e.tar.gz puppet-nginx-d0e87a428f8fa9a6e6463751e07663848d282f3e.tar.bz2 |
Use parametrized classes
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/base.pp | 6 | ||||
-rw-r--r-- | 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 <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'], |