Puppet Class: splunk::purge
- Defined in:
- manifests/purge.pp
Overview
USE WITH CAUTION splunk::purge takes no parameters and is dangerous! This class will PURGE all Splunk from your system. It’s not really great To keep this in your node defintions as package for us requred purge, since we installed TA’s with RPM’s and so need package - purged to ensure depencies got removed
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 'manifests/purge.pp', line 7
class splunk::purge () {
service {
'splunk':
ensure => stopped,
enable => false,
hasrestart => true,
pattern => 'splunkd',
before => Package['splunk','splunkforwarder'],
}
package { ['splunk','splunkforwarder']:
ensure => purged,
} ->
file { '/etc/init.d/splunk':
ensure => absent,
}
file { ['/opt/splunk','/opt/splunkforwarder']:
ensure => absent,
force => true,
recurse => true,
}
notice("*** NOTICE Purge running on node: ${::fqdn} ***")
notify {"*** NOTICE Purge running on node: ${::fqdn} ***":}
}
|