Forge Home

redis

Redis module

942,614 downloads

1,236 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 10.0.0 (latest)
  • 9.3.0
  • 9.2.0
  • 9.1.0
  • 9.0.0
  • 8.8.0
  • 8.7.0
  • 8.6.0
  • 8.5.0
  • 8.4.0
  • 8.3.0
  • 8.2.0
  • 8.1.1
  • 8.1.0
  • 8.0.0
  • 7.0.0
  • 6.1.0
  • 6.0.0
  • 5.0.0
  • 4.2.1
  • 4.2.0
  • 4.1.0
  • 4.0.0
released Sep 19th 2019
This version is compatible with:
  • Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x
  • Puppet >= 5.5.8 < 7.0.0
  • , , , , Archlinux
Tasks:
  • redis_cli

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'puppet-redis', '4.2.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add puppet-redis
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install puppet-redis --version 4.2.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

puppet/redis — version 4.2.1 Sep 19th 2019

Puppet Redis

License Build Status Code Coverage Puppet Forge Puppet Forge - downloads Puppet Forge - endorsement Puppet Forge - scores

Example usage

Standalone

include ::redis

Master node

class { '::redis':
  bind => '10.0.1.1',
}

With authentication

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

Slave node

class { '::redis':
  bind    => '10.0.1.2',
  slaveof => '10.0.1.1 6379',
}

With authentication

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

Redis 3.0 Clustering

class { '::redis':
  bind                 => '10.0.1.2',
  appendonly           => true,
  cluster_enabled      => true,
  cluster_config_file  => 'nodes.conf',
  cluster_node_timeout => 5000,
}

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',
}

Redis Sentinel

Optionally install and configuration a redis-sentinel server.

With default settings:

include ::redis::sentinel

With adjustments:

class { '::redis::sentinel':
  master_name      => 'cow',
  redis_host       => '192.168.1.5',
  failover_timeout => 30000,
}

redis::get() function

This function is used to get data from redis. You must have the 'redis' gem installed on your puppet master.

Functions are documented in REFERENCE.md

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=4.10.0 bundle update && bundle exec rake spec
$ FACTER_VERSION=1.6.8  bundle update && bundle exec rake spec

Contributing

  • Fork it
  • Create a feature branch (git checkout -b my-new-feature)
  • Run rspec tests (bundle exec rake spec)
  • Commit your changes (git commit -am 'Added some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create new Pull Request