Defined Type: elasticsearch::ruby
- Defined in:
- manifests/ruby.pp
Overview
Define: elasticsearch::ruby
there are many ruby bindings for elasticsearch. This provides all the ones we know about www.elasticsearch.org/guide/clients/
Parameters
- ensure
-
String. Controls if the managed resources shall be
present
orabsent
. If set toabsent
:-
The managed software packages are being uninstalled.
-
Any traces of the packages will be purged as good as possible. This may include existing configuration files. The exact behavior is provider dependent. Q.v.:
-
Puppet type reference: package, “purgeable”
-
-
System modifications (if any) will be reverted as good as possible (e.g. removal of created users, services, changed log settings, …).
-
This is thus destructive and should be used with care.
Defaults to
present
. -
Examples
elasticsearch::ruby { ‘elasticsearch’:; }
Authors
-
Richard Pijnenburg <richard@ispavailability.com>
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'manifests/ruby.pp', line 30
define elasticsearch::ruby (
$ensure = 'present'
) {
if ! ($ensure in [ 'present', 'absent' ]) {
fail("\"${ensure}\" is not a valid ensure parameter value")
}
# make sure the package name is valid and setup the provider as
# necessary
case $name {
'tire': {
$provider = 'gem'
}
'stretcher': {
$provider = 'gem'
}
'elastic_searchable': {
$provider = 'gem'
}
'elasticsearch': {
$provider = 'gem'
}
'flex': {
$provider = 'gem'
}
default: {
fail("unknown ruby client package '${name}'")
}
}
package { "ruby_${name}":
ensure => $ensure,
name => $name,
provider => $provider,
}
}
|