Merge "Change PTL informatin in INFO"
[bottlenecks.git] / testsuites / rubbos / puppet_manifests / modules / rubbos_monitor / manifests / rubbos_monitor_off.pp
1 #############################################################################
2 # Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10
11 class rubbos_monitor::rubbos_monitor_off {
12
13   include params::rubbos_params
14
15   # Declare some variables
16   $rubbos_app           = $params::rubbos_params::rubbos_app
17   $rubbos_home          = $params::rubbos_params::rubbos_home
18
19   # Make uninstall sysstat
20   exec {'make uninstall sysstat':
21         cwd     => "${rubbos_app}/sysstat-9.0.6",
22         command => "make uninstall",
23         path    => ["/bin","/sbin","/usr/bin","/usr/sbin","/usr/local/bin","/usr/local/sbin"],
24         onlyif  => "test -d ${rubbos_app}/sysstat-9.0.6",
25   }
26
27   # Remove sysstat-9.0.6 folder
28   file {'${rubbos_app}/sysstat-9.0.6':
29         ensure  => absent,
30         path    => "${rubbos_app}/sysstat-9.0.6",
31         force   => true,
32         recurse => true,
33         backup  => false,
34         require => Exec['make uninstall sysstat'],
35   }
36
37   # Remove bench folder
38   file {'${rubbos_home}/bench.tar.gz':
39         ensure  => absent,
40         path    => "${rubbos_home}/bench.tar.gz",
41         backup  => false,
42   }
43
44   file {'${rubbos_home}/bench':
45         ensure          => absent,
46         path            => "${rubbos_home}/bench",
47         force           => true,
48         recurse         => true,
49         backup          => false,
50         show_diff       => false,
51   }
52
53 }