Ensure gem utility is on the host

The gem utility is needed by the archive module to install the faraday
gem so that archive works.

Change-Id: I914a6c6490e17ba02b4a6af4ed20c9f33931a33f
This commit is contained in:
Spencer Krum 2015-11-27 10:43:13 -08:00
parent f6a724c575
commit 00ec398586
2 changed files with 24 additions and 2 deletions

View File

@ -20,11 +20,11 @@ class elasticsearch (
$url = 'https://download.elasticsearch.org/elasticsearch/elasticsearch',
$heap_size = '16g',
$es_template_config = {},
) {
) inherits elasticsearch::params {
# Ensure: java runtime and curl
# Curl is handy for talking to the ES API on localhost. Allows for
# querying cluster state and deleting indexes and so on.
ensure_packages(['openjdk-7-jre-headless', 'curl'])
ensure_packages(['openjdk-7-jre-headless', 'curl', $::elasticsearch::params::gem_package])
include '::archive'

22
manifests/params.pp Normal file
View File

@ -0,0 +1,22 @@
# Params class
class elasticsearch::params (
){
case $::osfamily {
'Debian': {
if $::lsbdistcodename == 'precise' {
# package names
$gem_package = 'rubygems'
} else {
# package names
$gem_package = 'ruby'
}
}
default: {
$gem_package = 'ruby'
}
}
}