Puppet Class: opensearch::decommission

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

Overview

SPDX-License-Identifier: Apache-2.0

Class: opensearch

This class decommissions the opensearch service.



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
31
# File 'modules/opensearch/manifests/decommission.pp', line 6

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,
    }
}