Puppet Class: opensearch::decommission

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

Overview

Class: opensearch

This class decommissions the opensearch 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/opensearch/manifests/decommission.pp', line 5

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

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

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