Skip to content

Commit

Permalink
doc + test cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Hoblitt committed Aug 29, 2013
1 parent fe80566 commit 66d1367
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 30 deletions.
2 changes: 0 additions & 2 deletions .fixtures.yml
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}"
5 changes: 2 additions & 3 deletions Modulefile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
42 changes: 31 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,46 @@ Puppet sysstat Module

[![Build Status](https://travis-ci.org/jhoblitt/puppet-sysstat.png)](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
Expand All @@ -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]>

8 changes: 7 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# == Class: sysstat
#
# === Examples
#
# include sysstat
#
# === Authors
#
# Joshua Hoblitt <[email protected]>
Expand All @@ -9,5 +13,7 @@
# Copyright (C) 2013 Joshua Hoblitt
#
class sysstat {
include sysstat::install, sysstat::service
class { 'sysstat::install': } ->
class { 'sysstat::service': } ->
Class['Sysstat']
}
6 changes: 4 additions & 2 deletions manifests/install.pp
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]>
Expand All @@ -9,7 +11,7 @@
# Copyright (C) 2013 Joshua Hoblitt
#
class sysstat::install {
package {'sysstat':
ensure => latest,
package { 'sysstat':
ensure => present,
}
}
7 changes: 2 additions & 5 deletions manifests/service.pp
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]>
Expand All @@ -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'],
}
}
11 changes: 5 additions & 6 deletions spec/classes/sysstat_spec.rb
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

0 comments on commit 66d1367

Please sign in to comment.