diff --git a/.fixtures.yml b/.fixtures.yml new file mode 100644 index 0000000..ec7d70c --- /dev/null +++ b/.fixtures.yml @@ -0,0 +1,5 @@ +fixtures: + repositories: + "stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib.git" + symlinks: + "sysstat": "#{source_dir}" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b7a885f --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +pkg/ +spec/fixtures/ +Gemfile.lock +*.orig +*.rej +*.patch diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..80fcb3d --- /dev/null +++ b/.travis.yml @@ -0,0 +1,31 @@ +language: ruby +rvm: + - 1.8.7 + - 1.9.3 + - 2.0.0 + - ruby-head +env: + - PUPPET_GEM_VERSION="~> 2.7.0" + - PUPPET_GEM_VERSION="~> 3.0.0" + - PUPPET_GEM_VERSION="~> 3.1.0" + - PUPPET_GEM_VERSION="~> 3.2.1" +matrix: + allow_failures: + - rvm: ruby-head + exclude: + - rvm: 1.9.3 + env: PUPPET_GEM_VERSION="~> 2.7.0" + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="~> 2.7.0" + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="~> 3.0.0" + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="~> 3.1.0" + - rvm: ruby-head + env: PUPPET_GEM_VERSION="~> 2.7.0" + - rvm: ruby-head + env: PUPPET_GEM_VERSION="~> 3.0.0" + - rvm: ruby-head + env: PUPPET_GEM_VERSION="~> 3.1.0" +notifications: + email: false diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..af9879b --- /dev/null +++ b/Gemfile @@ -0,0 +1,14 @@ +source 'https://rubygems.org' + +if puppetversion = ENV['PUPPET_GEM_VERSION'] + gem 'puppet', puppetversion, :require => false +else + gem 'puppet', :require => false +end + +gem 'rake' +gem 'puppetlabs_spec_helper' +gem 'puppet-lint' +gem 'puppet-syntax' + +# vim:ft=ruby diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..7546c39 --- /dev/null +++ b/LICENSE @@ -0,0 +1,13 @@ +Copyright (C) 2012-2013 Joshua Hoblitt + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Modulefile b/Modulefile new file mode 100644 index 0000000..4bc39ae --- /dev/null +++ b/Modulefile @@ -0,0 +1,10 @@ +name 'jhoblitt-sysstat' +version '1.0.0' + +author 'Joshua Hoblitt ' +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' diff --git a/README.md b/README.md new file mode 100644 index 0000000..a5750bb --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +Puppet sysstat Module +========================= + +[![Build Status](https://travis-ci.org/jhoblitt/puppet-sysstat.png)](https://travis-ci.org/jhoblitt/puppet-sysstat) + + +Description +----------- + +This module installs and manages the +[sysstat](/etc/puppet/env/prod/modules/sysstat) package which provides the +`sar` and `iostat` commands. + + +Examples +-------- + + include systat + + class { 'systat': } + + +Support +------- + +Please log tickets and issues at [github](https://github.com/jhoblitt/puppet-sysstat/issues) + + +Copyright +--------- + +Copyright (C) 2011-2013 Joshua Hoblitt + diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..6ae60ce --- /dev/null +++ b/Rakefile @@ -0,0 +1,14 @@ +require 'puppetlabs_spec_helper/rake_tasks' +require 'puppet-syntax/tasks/puppet-syntax' +require 'puppet-lint/tasks/puppet-lint' + +#PuppetSyntax.exclude_paths = ["vendor/**/*"] +#PuppetLint.configuration.send("disable_class_inherits_from_params_class") +#PuppetLint.configuration.send("disable_variable_scope") +PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", 'tests/**/*.pp'] + +task :default => [ + :syntax, + :lint, + :spec, +] diff --git a/manifests/init.pp b/manifests/init.pp index ec44e5e..63850ec 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,3 +1,13 @@ +# == Class: sysstat +# +# === Authors +# +# Joshua Hoblitt +# +# === Copyright +# +# Copyright (C) 2013 Joshua Hoblitt +# class sysstat { include sysstat::install, sysstat::service } diff --git a/spec/classes/sysstat_spec.rb b/spec/classes/sysstat_spec.rb new file mode 100644 index 0000000..c18d03e --- /dev/null +++ b/spec/classes/sysstat_spec.rb @@ -0,0 +1,9 @@ +require 'spec_helper' + +describe 'sysstat', :type => 'class' do + + describe 'for osfamily RedHat' do + it { should contain_class('sysstat') } + end + +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb new file mode 100644 index 0000000..2c6f566 --- /dev/null +++ b/spec/spec_helper.rb @@ -0,0 +1 @@ +require 'puppetlabs_spec_helper/module_spec_helper'