Puppet Class: mongodb::decommission

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

Overview

Class: mongodb::decommission

This class automates the process of retiring a MongoDB instance. It shuts down the MongoDB service and removes its configuration file. Log files and database data files (if any) are left untouched.



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'modules/mongodb/manifests/decommission.pp', line 7

class mongodb::decommission {
    service { 'mongodb':
        ensure => stopped,
        before => Package['mongodb'],
    }

    package { 'mongodb':
        ensure  => absent,
    }

    file { '/etc/mongodb.conf':
        ensure  => absent,
    }
}