File: ruby.rb

package info (click to toggle)
puppet-module-voxpupuli-elasticsearch 9.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,496 kB
  • sloc: ruby: 9,906; sh: 392; makefile: 4
file content (27 lines) | stat: -rw-r--r-- 854 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# frozen_string_literal: true

require 'puppet/provider/elastic_plugin'

Puppet::Type.type(:elasticsearch_plugin).provide(
  :elasticsearch_plugin,
  parent: Puppet::Provider::ElasticPlugin
) do
  desc <<-END
    Post-5.x provider for Elasticsearch bin/elasticsearch-plugin
    command operations.'
  END

  case Facter.value('osfamily')
  when 'OpenBSD'
    commands plugin: '/usr/local/elasticsearch/bin/elasticsearch-plugin'
    commands es: '/usr/local/elasticsearch/bin/elasticsearch'
    commands javapathhelper: '/usr/local/bin/javaPathHelper'
  else
    if File.exist? '/usr/share/elasticsearch/bin/elasticsearch-plugin'
      commands plugin: '/usr/share/elasticsearch/bin/elasticsearch-plugin'
    else
      commands plugin: '/usr/share/elasticsearch/bin/plugin'
    end
    commands es: '/usr/share/elasticsearch/bin/elasticsearch'
  end
end