-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Joshua Hoblitt
committed
Aug 29, 2013
1 parent
fe80566
commit 66d1367
Showing
7 changed files
with
51 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
fixtures: | ||
repositories: | ||
"stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib.git" | ||
symlinks: | ||
"sysstat": "#{source_dir}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,5 @@ author 'Joshua Hoblitt <[email protected]>' | |
license 'Apache' | ||
project_page 'https://github.com/jhoblitt/puppet-sysstat' | ||
source 'https://github.com/jhoblitt/puppet-sysstat.git' | ||
summary 'manage the sysstat package' | ||
description 'manage the sysstat package' | ||
dependency 'puppetlabs/stdlib', '>= 1.0.0' | ||
summary 'Manages the sysstat package' | ||
description 'Manages the sysstat package' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,21 +3,46 @@ Puppet sysstat Module | |
|
||
[](https://travis-ci.org/jhoblitt/puppet-sysstat) | ||
|
||
#### Table of Contents | ||
|
||
1. [Overview](#overview) | ||
2. [Description](#description) | ||
3. [Usage](#usage) | ||
4. [Limitations](#limitations) | ||
* [Tested Platforms](#tested-platforms) | ||
5. [Support](#support) | ||
|
||
|
||
Overview | ||
-------- | ||
|
||
Manages the sysstat package | ||
|
||
|
||
Description | ||
----------- | ||
|
||
This module installs and manages the | ||
[sysstat](/etc/puppet/env/prod/modules/sysstat) package which provides the | ||
`sar` and `iostat` commands. | ||
[sysstat](http://sebastien.godard.pagesperso-orange.fr/) package which provides | ||
the `sar` and `iostat` commands. | ||
|
||
|
||
Examples | ||
-------- | ||
Usage | ||
----- | ||
|
||
include systat | ||
include sysstat | ||
|
||
class { 'systat': } | ||
|
||
Limitations | ||
----------- | ||
|
||
At present, only support for `$::osfamily == 'RedHat'` has been implimented. | ||
Adding other Linux distrubtions should be trivial. | ||
|
||
### Tested on | ||
|
||
* el5.x | ||
* el6.x | ||
|
||
|
||
Support | ||
|
@@ -26,8 +51,3 @@ Support | |
Please log tickets and issues at [github](https://github.com/jhoblitt/puppet-sysstat/issues) | ||
|
||
|
||
Copyright | ||
--------- | ||
|
||
Copyright (C) 2011-2013 Joshua Hoblitt <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
# == Class: sysstat | ||
# | ||
# === Examples | ||
# | ||
# include sysstat | ||
# | ||
# === Authors | ||
# | ||
# Joshua Hoblitt <[email protected]> | ||
|
@@ -9,5 +13,7 @@ | |
# Copyright (C) 2013 Joshua Hoblitt | ||
# | ||
class sysstat { | ||
include sysstat::install, sysstat::service | ||
class { 'sysstat::install': } -> | ||
class { 'sysstat::service': } -> | ||
Class['Sysstat'] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# == Class: sysstat::install | ||
# | ||
# This class should be considered private. | ||
# | ||
# === Authors | ||
# | ||
# Joshua Hoblitt <[email protected]> | ||
|
@@ -9,7 +11,7 @@ | |
# Copyright (C) 2013 Joshua Hoblitt | ||
# | ||
class sysstat::install { | ||
package {'sysstat': | ||
ensure => latest, | ||
package { 'sysstat': | ||
ensure => present, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# == Class: sysstat::service | ||
# | ||
# This class should be considered private. | ||
# | ||
# === Authors | ||
# | ||
# Joshua Hoblitt <[email protected]> | ||
|
@@ -9,14 +11,9 @@ | |
# Copyright (C) 2013 Joshua Hoblitt | ||
# | ||
class sysstat::service { | ||
include sysstat::install | ||
|
||
service{ 'sysstat': | ||
# ensure => running, | ||
hasstatus => false, | ||
hasrestart => true, | ||
enable => true, | ||
require => Class['sysstat::install'], | ||
subscribe => Class['sysstat::install'], | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
require 'spec_helper' | ||
|
||
describe 'sysstat', :type => 'class' do | ||
|
||
describe 'for osfamily RedHat' do | ||
it { should contain_class('sysstat') } | ||
end | ||
|
||
describe 'sysstat', :type => :class do | ||
it { should contain_class('sysstat') } | ||
it { should contain_class('sysstat::install') } | ||
it { should contain_package('sysstat').with_ensure('present') } | ||
it { should contain_class('sysstat::service') } | ||
end |