1 # == Class: elasticsearch::repo
3 # This class exists to install and manage yum and apt repositories
4 # that contain elasticsearch official elasticsearch packages
9 # This class does not provide any parameters.
14 # This class may be imported by other classes to use its functionality:
15 # class { 'elasticsearch::repo': }
17 # It is not intended to be used directly by external resources like node
18 # definitions or other modules.
23 # * Phil Fenstermacher <mailto:phillip.fenstermacher@gmail.com>
24 # * Richard Pijnenburg <mailto:richard.pijnenburg@elasticsearch.com>
26 class elasticsearch::repo {
29 path => [ '/bin', '/usr/bin', '/usr/local/bin' ],
35 if !defined(Class['apt']) {
39 apt::source { 'elasticsearch':
40 location => "http://packages.elasticsearch.org/elasticsearch/${elasticsearch::repo_version}/debian",
44 key_source => 'http://packages.elasticsearch.org/GPG-KEY-elasticsearch',
49 yumrepo { 'elasticsearch':
50 descr => 'elasticsearch repo',
51 baseurl => "http://packages.elasticsearch.org/elasticsearch/${elasticsearch::repo_version}/centos",
53 gpgkey => 'http://packages.elasticsearch.org/GPG-KEY-elasticsearch',
58 exec { 'elasticsearch_suse_import_gpg':
59 command => 'rpmkeys --import http://packages.elasticsearch.org/GPG-KEY-elasticsearch',
60 unless => 'test $(rpm -qa gpg-pubkey | grep -i "D88E42B4" | wc -l) -eq 1 ',
61 notify => [ Zypprepo['elasticsearch'] ]
64 zypprepo { 'elasticsearch':
65 baseurl => "http://packages.elasticsearch.org/elasticsearch/${elasticsearch::repo_version}/centos",
68 name => 'elasticsearch',
70 gpgkey => 'http://packages.elasticsearch.org/GPG-KEY-elasticsearch',
75 fail("\"${module_name}\" provides no repository information for OSfamily \"${::osfamily}\"")