16 changes: 13 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,19 +131,29 @@ You can install all needed gems for spec tests into the modules directory by
running:

```sh
bundle install --path .vendor/ --without development system_tests release --jobs "$(nproc)"
bundle config set --local path '.vendor/'
bundle config set --local without 'development system_tests release'
bundle install --jobs "$(nproc)"
```

If you also want to run acceptance tests:

```sh
bundle install --path .vendor/ --with system_tests --without development release --jobs "$(nproc)"
bundle config set --local path '.vendor/'
bundle config set --local without 'development release'
bundle config set --local with 'system_tests'
bundle install --jobs "$(nproc)"
```

Our all in one solution if you don't know if you need to install or update gems:

```sh
bundle install --path .vendor/ --with system_tests --without development release --jobs "$(nproc)"; bundle update; bundle clean
bundle config set --local path '.vendor/'
bundle config set --local without 'development release'
bundle config set --local with 'system_tests'
bundle install --jobs "$(nproc)"
bundle update
bundle clean
```

As an alternative to the `--jobs "$(nproc)` parameter, you can set an
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@
.*.sw?
/.yardoc/
/Guardfile
bolt-debug.log
.rerun.json
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

modulesync_config_version: '7.3.0'
modulesync_config_version: '7.5.0'
3 changes: 3 additions & 0 deletions .sync.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
Gemfile:
optional:
':system_tests':
- gem: 'voxpupuli-acceptance'
version: '~> 3.1'
':test':
- gem: 'redis'
- gem: 'mock_redis'
Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,30 @@ All notable changes to this project will be documented in this file.
Each new release typically also includes the latest modulesync defaults.
These should not affect the functionality of the module.

## [v11.0.0](https://github.com/voxpupuli/puppet-redis/tree/v11.0.0) (2024-05-08)

[Full Changelog](https://github.com/voxpupuli/puppet-redis/compare/v10.0.0...v11.0.0)

**Breaking changes:**

- Drop support for EoL CentOS 8 [\#525](https://github.com/voxpupuli/puppet-redis/pull/525) ([evgeni](https://github.com/evgeni))
- Drop EL7 compatibility code [\#509](https://github.com/voxpupuli/puppet-redis/pull/509) ([ekohl](https://github.com/ekohl))

**Implemented enhancements:**

- Add Debian 12 Support [\#520](https://github.com/voxpupuli/puppet-redis/pull/520) ([traylenator](https://github.com/traylenator))
- update puppet-systemd upper bound to 8.0.0 [\#518](https://github.com/voxpupuli/puppet-redis/pull/518) ([TheMeier](https://github.com/TheMeier))
- Avoid deprecated systemd::service\_limits [\#514](https://github.com/voxpupuli/puppet-redis/pull/514) ([traylenator](https://github.com/traylenator))
- Allow `requirepass` to be set as a Sensitive string [\#512](https://github.com/voxpupuli/puppet-redis/pull/512) ([traylenator](https://github.com/traylenator))
- Modernize the acceptance tests [\#438](https://github.com/voxpupuli/puppet-redis/pull/438) ([ekohl](https://github.com/ekohl))
- add custom options parameter to instance [\#431](https://github.com/voxpupuli/puppet-redis/pull/431) ([trefzer](https://github.com/trefzer))
- Add some additional parameters for ownerships [\#429](https://github.com/voxpupuli/puppet-redis/pull/429) ([trefzer](https://github.com/trefzer))

**Fixed bugs:**

- Install redis-sentinal package before redis [\#516](https://github.com/voxpupuli/puppet-redis/pull/516) ([traylenator](https://github.com/traylenator))
- Support rich datatypes and deferred password values [\#515](https://github.com/voxpupuli/puppet-redis/pull/515) ([traylenator](https://github.com/traylenator))

## [v10.0.0](https://github.com/voxpupuli/puppet-redis/tree/v10.0.0) (2024-02-16)

[Full Changelog](https://github.com/voxpupuli/puppet-redis/compare/v9.3.0...v10.0.0)
Expand Down
24 changes: 0 additions & 24 deletions Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ group :development do
end

group :system_tests do
gem 'voxpupuli-acceptance', '~> 3.0', :require => false
gem 'voxpupuli-acceptance', '~> 3.1', :require => false
end

group :release do
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Puppet Redis

[![License](https://img.shields.io/github/license/voxpupuli/puppet-redis.svg)](https://github.com/voxpupuli/puppet-redis/blob/master/LICENSE)
[![Build Status](https://travis-ci.org/voxpupuli/puppet-redis.png?branch=master)](https://travis-ci.org/voxpupuli/puppet-redis)
[![CI](https://github.com/voxpupuli/puppet-redis/actions/workflows/ci.yml/badge.svg)](https://github.com/voxpupuli/puppet-redis/actions/workflows/ci.yml)
[![Code Coverage](https://coveralls.io/repos/github/voxpupuli/puppet-redis/badge.svg?branch=master)](https://coveralls.io/github/voxpupuli/puppet-redis)
[![Puppet Forge](https://img.shields.io/puppetforge/v/puppet/redis.svg)](https://forge.puppetlabs.com/puppet/redis)
[![Puppet Forge - downloads](https://img.shields.io/puppetforge/dt/puppet/redis.svg)](https://forge.puppetlabs.com/puppet/redis)
Expand Down Expand Up @@ -111,7 +111,7 @@ class { 'redis':
}
```

**Warning** note that PPA usage requires [puppetlabs/apt](https://forge.puppet.com/puppetlabs/apt) on Ubuntu distros. On EL7 [puppet/epel](https://forge.puppet.com/puppet/epel) is needed unless the installation is using Software Collections. In that case will install `centos-release-scl-rh` from CentOS extras. For RHEL or other RHEL-derivatives this isn't managed.
**Warning** note that PPA usage requires [puppetlabs/apt](https://forge.puppet.com/puppetlabs/apt) on Ubuntu distros

### Redis Sentinel

Expand All @@ -135,7 +135,7 @@ class { 'redis::sentinel':

### Soft dependency

When managing the repo, it either needs [puppetlabs/apt](https://forge.puppet.com/puppetlabs/apt) or [puppet/epel](https://forge.puppet.com/puppet/epel).
When managing the repo, it needs [puppetlabs/apt](https://forge.puppet.com/puppetlabs/apt).

For administration of sysctl it depends on [herculesteam/augeasproviders_sysctl](https://forge.puppet.com/herculesteam/augeasproviders_sysctl).

Expand Down
80 changes: 59 additions & 21 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

* [`redis`](#redis): This class installs redis
* [`redis::administration`](#redis--administration): Allows various administrative settings for Redis
* [`redis::globals`](#redis--globals): Set a global config for Redis
* [`redis::sentinel`](#redis--sentinel): Install redis-sentinel

#### Private Classes
Expand Down Expand Up @@ -200,6 +199,11 @@ The following parameters are available in the `redis` class:
* [`unixsocketperm`](#-redis--unixsocketperm)
* [`workdir`](#-redis--workdir)
* [`workdir_mode`](#-redis--workdir_mode)
* [`workdir_group`](#-redis--workdir_group)
* [`workdir_owner`](#-redis--workdir_owner)
* [`debdefault_group`](#-redis--debdefault_group)
* [`debdefault_file_mode`](#-redis--debdefault_file_mode)
* [`debdefault_owner`](#-redis--debdefault_owner)
* [`zset_max_ziplist_entries`](#-redis--zset_max_ziplist_entries)
* [`zset_max_ziplist_value`](#-redis--zset_max_ziplist_value)
* [`cluster_enabled`](#-redis--cluster_enabled)
Expand Down Expand Up @@ -806,7 +810,7 @@ Default value: `60`

##### <a name="-redis--requirepass"></a>`requirepass`

Data type: `Optional[Variant[String, Deferred]]`
Data type: `Optional[Variant[String, Sensitive[String[1]], Deferred]]`

Require clients to issue AUTH <PASSWORD> before processing any other commands.

Expand Down Expand Up @@ -1161,6 +1165,49 @@ Adjust mode for data directory.

Default value: `'0750'`

##### <a name="-redis--workdir_group"></a>`workdir_group`

Data type: `Optional[String[1]]`

Adjust filesystem group for $workdir.

Default value: `undef`

##### <a name="-redis--workdir_owner"></a>`workdir_owner`

Data type: `Optional[String[1]]`

Adjust filesystem owner for $workdir.

Default value: `undef`

##### <a name="-redis--debdefault_group"></a>`debdefault_group`

Data type: `Optional[String[1]]`

group of /etc/defaults/redis on Debian systems
if undef, $redis::config_group is taken

Default value: `undef`

##### <a name="-redis--debdefault_file_mode"></a>`debdefault_file_mode`

Data type: `Optional[Stdlib::Filemode]`

filemode of /etc/defaults/redis on Debian systems
if undef, $redis::config_file_mode is taken

Default value: `undef`

##### <a name="-redis--debdefault_owner"></a>`debdefault_owner`

Data type: `Optional[String[1]]`

owner of /etc/defaults/redis on Debian systems
if undef, $redis::config_owner is taken

Default value: `undef`

##### <a name="-redis--zset_max_ziplist_entries"></a>`zset_max_ziplist_entries`

Data type: `Integer[0]`
Expand Down Expand Up @@ -1441,24 +1488,6 @@ Set somaxconn value

Default value: `65535`

### <a name="redis--globals"></a>`redis::globals`

Set a global config for Redis

#### Parameters

The following parameters are available in the `redis::globals` class:

* [`scl`](#-redis--globals--scl)

##### <a name="-redis--globals--scl"></a>`scl`

Data type: `Optional[String]`

Use a specific Software Collection on Red Hat 7 based systems

Default value: `undef`

### <a name="redis--sentinel"></a>`redis::sentinel`

Install redis-sentinel
Expand Down Expand Up @@ -2013,6 +2042,7 @@ The following parameters are available in the `redis::instance` defined type:
* [`acls`](#-redis--instance--acls)
* [`output_buffer_limit_slave`](#-redis--instance--output_buffer_limit_slave)
* [`output_buffer_limit_pubsub`](#-redis--instance--output_buffer_limit_pubsub)
* [`custom_options`](#-redis--instance--custom_options)

##### <a name="-redis--instance--activerehashing"></a>`activerehashing`

Expand Down Expand Up @@ -2457,7 +2487,7 @@ Default value: `$redis::repl_timeout`

##### <a name="-redis--instance--requirepass"></a>`requirepass`

Data type: `Optional[Variant[String, Deferred]]`
Data type: `Optional[Variant[String, Sensitive[String[1]], Deferred]]`

Require clients to issue AUTH <PASSWORD> before processing any other
commands.
Expand Down Expand Up @@ -3025,6 +3055,14 @@ Value of client-output-buffer-limit-pubsub in redis config

Default value: `$redis::output_buffer_limit_pubsub`

##### <a name="-redis--instance--custom_options"></a>`custom_options`

Data type: `Hash[String[1],Variant[String[1], Integer]]`

hash of custom options, not available as direct parameter.

Default value: `{}`

## Functions

### <a name="redis--get"></a>`redis::get`
Expand Down
10 changes: 5 additions & 5 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@

file { $redis::workdir:
ensure => directory,
group => $redis::service_group,
group => pick($redis::workdir_group, $redis::service_group),
mode => $redis::workdir_mode,
owner => $redis::service_user,
owner => pick($redis::workdir_owner, $redis::service_user),
}

if $redis::default_install {
Expand All @@ -48,9 +48,9 @@
'Debian': {
file { '/etc/default/redis-server':
ensure => file,
group => $redis::config_group,
mode => $redis::config_file_mode,
owner => $redis::config_owner,
group => pick($redis::debdefault_group, $redis::config_group),
mode => pick($redis::debdefault_file_mode, $redis::config_file_mode),
owner => pick($redis::debdefault_owner, $redis::config_owner),
}
}

Expand Down
11 changes: 0 additions & 11 deletions manifests/globals.pp

This file was deleted.

20 changes: 19 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,19 @@
# above using the 'dbfilename' configuration directive.
# @param workdir_mode
# Adjust mode for data directory.
# @param workdir_group
# Adjust filesystem group for $workdir.
# @param workdir_owner
# Adjust filesystem owner for $workdir.
# @param debdefault_group
# group of /etc/defaults/redis on Debian systems
# if undef, $redis::config_group is taken
# @param debdefault_file_mode
# filemode of /etc/defaults/redis on Debian systems
# if undef, $redis::config_file_mode is taken
# @param debdefault_owner
# owner of /etc/defaults/redis on Debian systems
# if undef, $redis::config_owner is taken
# @param zset_max_ziplist_entries
# Set max entries for sorted sets.
# @param zset_max_ziplist_value
Expand Down Expand Up @@ -412,7 +425,7 @@
Boolean $repl_disable_tcp_nodelay = false,
Integer[1] $repl_ping_slave_period = 10,
Integer[1] $repl_timeout = 60,
Optional[Variant[String, Deferred]] $requirepass = undef,
Optional[Variant[String, Sensitive[String[1]], Deferred]] $requirepass = undef,
Boolean $save_db_to_disk = true,
Hash $save_db_to_disk_interval = { '900' => '1', '300' => '10', '60' => '10000' },
Boolean $service_enable = true,
Expand Down Expand Up @@ -455,6 +468,11 @@
Boolean $ulimit_managed = true,
Stdlib::Absolutepath $workdir = $redis::params::workdir,
Stdlib::Filemode $workdir_mode = '0750',
Optional[String[1]] $workdir_group = undef,
Optional[String[1]] $workdir_owner = undef,
Optional[String[1]] $debdefault_group = undef,
Optional[Stdlib::Filemode] $debdefault_file_mode = undef,
Optional[String[1]] $debdefault_owner = undef,
Integer[0] $zset_max_ziplist_entries = 128,
Integer[0] $zset_max_ziplist_value = 64,
Boolean $cluster_enabled = false,
Expand Down
Loading