Puppet Class: elasticsearch::decommission

Defined in:
modules/elasticsearch/manifests/decommission.pp

Overview

Class: elasticsearch

This class decommissions the elasticsearch service.



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'modules/elasticsearch/manifests/decommission.pp', line 5

class elasticsearch::decommission {
    # Remove package
    package { 'elasticsearch':
        ensure  => absent,
    }

    # Remove configuration
    file { '/etc/elasticsearch/elasticsearch.yml':
        ensure => absent,
    }
    file { '/etc/elasticsearch/logging.yml':
        ensure => absent,
    }
    file { '/etc/default/elasticsearch':
        ensure => absent,
    }
    logrotate::rule { 'elasticsearch':
        ensure => absent,
    }

    # Stop the service
    service { 'elasticsearch':
        ensure => stopped,
        enable => false,
    }
}