Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic update #137

Merged
merged 1 commit into from
Nov 14, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Puppetfile
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ mod 'rabbitmq',
:commit => '4832bd61b5b1bfea7c9cc985508e65cd10081652',
:git => 'https://github.com/puppetlabs/puppetlabs-rabbitmq.git'

mod 'redis',
:commit => '31ecbcace3cacf26ad85d90abc2409da8973e788',
:git => 'https://github.com/arioch/puppet-redis.git'

mod 'rsync',
:commit => '357d51f3a6a22bc3da842736176c3510e507b4fb',
:git => 'https://github.com/puppetlabs/puppetlabs-rsync.git'
Expand Down
8 changes: 8 additions & 0 deletions redis/.fixtures.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
fixtures:
repositories:
apt: 'git://github.com/puppetlabs/puppetlabs-apt.git'
stdlib: 'git://github.com/puppetlabs/puppetlabs-stdlib.git'

symlinks:
redis: "#{source_dir}"

7 changes: 7 additions & 0 deletions redis/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*.swp
.DS_Store
Gemfile.lock
pkg
spec/fixtures
.yardoc
doc
2 changes: 2 additions & 0 deletions redis/.puppet-lint.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--with-filename
#--no-80chars-check
30 changes: 30 additions & 0 deletions redis/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
language: ruby

rvm:
- 1.8.7
- 1.9.3
- 2.0.0

matrix:
allow_failures:
- rvm: 1.8.7
- rvm: 2.0.0
env: PUPPET_VERSION="2.7"

before_install:
- 'gem install bundler'

script:
- 'rake spec'

env:
- PUPPET_VERSION="2.7"
- PUPPET_VERSION="3.0"
- PUPPET_VERSION="3.1"
- PUPPET_VERSION="3.2"

branches:
only:
- master
- develop

20 changes: 20 additions & 0 deletions redis/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
source 'https://rubygems.org'

puppetversion = ENV.key?('PUPPET_VERSION') ? "~> #{ENV['PUPPET_VERSION']}" : ['>= 3.2.1']
gem 'puppet', puppetversion

if puppetversion =~ /^3/
## rspec-hiera-puppet is puppet 3 only
gem 'rspec-hiera-puppet', '>=1.0.0'
end

facterversion = ENV.key?('FACTER_VERSION') ? "~> #{ENV['FACTER_VERSION']}" : ['>= 1.7.1']

gem 'facter', facterversion

gem 'rake'
gem 'rspec'
gem 'puppet-lint', '>=0.3.2'
gem 'rspec-puppet', '>=0.1.6'
gem 'puppetlabs_spec_helper', '>=0.4.1'

14 changes: 14 additions & 0 deletions redis/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Copyright (C) 2012 Tom De Vylder

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.

60 changes: 60 additions & 0 deletions redis/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Puppet Redis

## Build status

[![Build Status](https://travis-ci.org/arioch/puppet-redis.png?branch=master)](https://travis-ci.org/arioch/puppet-redis)

## Example usage

### Standalone

class { 'redis':;
}

### Master node

class { 'redis':
bind => '10.0.1.1';
#masterauth => 'secret';
}

### Slave node

class { 'redis':
bind => '10.0.1.2',
slaveof => '10.0.1.1 6379';
#masterauth => 'secret';
}

### Manage repositories

Disabled by default but if you really want the module to manage the required
repositories you can use this snippet:

class { 'redis':
manage_repo => true,
}

On Ubuntu, "chris-lea/redis-server" ppa repo will be added. You can change it by using ppa_repo parameter:

class { 'redis':
manage_repo => true,
ppa_repo => 'ppa:rwky/redis',
}

## Unit testing

Plain RSpec:

$ rake spec

Using bundle:

$ bundle exec rake spec

Test against a specific Puppet or Facter version:

$ PUPPET_VERSION=3.2.1 bundle update && bundle exec rake spec
$ PUPPET_VERSION=2.7.19 bundle update && bundle exec rake spec
$ FACTER_VERSION=1.6.8 bundle update && bundle exec rake spec

17 changes: 17 additions & 0 deletions redis/Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
require 'rake'
require 'rspec/core/rake_task'
require 'puppetlabs_spec_helper/rake_tasks'

RSpec::Core::RakeTask.new(:spec_verbose) do |t|
t.pattern = 'spec/*/*_spec.rb'
t.rspec_opts = File.read('spec/spec.opts').chomp || ""
end

task :test do
Rake::Task[:spec_prep].invoke
Rake::Task[:spec_verbose].invoke
Rake::Task[:spec_clean].invoke
end


task :default => [:spec, :lint]
59 changes: 59 additions & 0 deletions redis/manifests/config.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# = Class: redis::config
#
# This class provides configuration for Redis.
#
class redis::config {
if $::redis::notify_service {
File {
owner => $::redis::config_owner,
group => $::redis::config_group,
mode => $::redis::config_file_mode,
notify => Service[$::redis::service_name]
}
} else {
File {
owner => $::redis::config_owner,
group => $::redis::config_group,
mode => $::redis::config_file_mode,
}
}

file {
$::redis::config_dir:
ensure => directory,
mode => $::redis::config_dir_mode;

$::redis::config_file:
ensure => present,
content => template($::redis::conf_template);

$::redis::log_dir:
ensure => directory,
group => $::redis::service_group,
mode => $::redis::config_dir_mode,
owner => $::redis::service_user;
}

# Adjust /etc/default/redis-server on Debian systems
case $::osfamily {
'Debian': {
file { '/etc/default/redis-server':
ensure => present,
group => $::redis::config_group,
mode => $::redis::config_file_mode,
owner => $::redis::config_owner,
}

if $::redis::ulimit {
augeas { 'redis ulimit' :
context => '/files/etc/default/redis-server',
changes => "set ULIMIT ${::redis::ulimit}",
}
}
}

default: {
}
}
}

Loading