Colleen Murphy 399a2ca633 Parameterize JRE package
Add a params class so that puppet can distinguish between JRE packages
on different Ubuntu releases.

Change-Id: Ia1d22379d915d347c549c8cb8785920d97470f06
2017-06-14 14:38:27 +02:00

47 lines
1.4 KiB
Puppet

# Copyright 2013 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# = Class: Logstash
#
# Class to install common logstash items.
#
class logstash {
include ::logstash::params
include ::logrotate
archive { '/tmp/logstash-2.4.1_all.deb':
source => 'https://download.elastic.co/logstash/logstash/packages/debian/logstash-2.4.1_all.deb',
extract => false,
checksum => '7ba3b174a3ef48a7d0945d9b5c7f12c5005abb47',
checksum_type => 'sha1',
}
if ! defined(Package[$::logstash::params::jre_package]) {
package { $::logstash::params::jre_package:
ensure => present,
}
}
package { 'logstash':
ensure => latest,
source => '/tmp/logstash-2.4.1_all.deb',
provider => 'dpkg',
require => [
Package['logrotate'],
Package[$::logstash::params::jre_package],
Archive['/tmp/logstash-2.4.1_all.deb'],
]
}
}