9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@

name: CI

on: pull_request
on:
pull_request: {}
push:
branches:
- main
- master

concurrency:
group: ${{ github.ref_name }}
Expand All @@ -13,6 +18,6 @@ concurrency:
jobs:
puppet:
name: Puppet
uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v1
uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v2
with:
pidfile_workaround: 'false'
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
release:
name: Release
uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v1
uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v2
with:
allowed_owner: 'voxpupuli'
secrets:
Expand Down
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.0.0'
modulesync_config_version: '7.3.0'
1 change: 1 addition & 0 deletions .pmtignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@
/.yardoc/
/.yardopts
/Dockerfile
/HISTORY.md
3 changes: 1 addition & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
inherit_from: .rubocop_todo.yml

# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

inherit_from: .rubocop_todo.yml
inherit_gem:
voxpupuli-test: rubocop.yml
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,23 @@ 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.

## [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)

**Breaking changes:**

- remove legacy Debian 10 / Ubuntu 18.04 / CentOS 7 [\#504](https://github.com/voxpupuli/puppet-redis/pull/504) ([rwaffen](https://github.com/rwaffen))

**Implemented enhancements:**

- Add Ubuntu 22.04 [\#505](https://github.com/voxpupuli/puppet-redis/pull/505) ([rwaffen](https://github.com/rwaffen))
- Implement rudimentary Redis and Sentinel ACLs [\#502](https://github.com/voxpupuli/puppet-redis/pull/502) ([TwizzyDizzy](https://github.com/TwizzyDizzy))

**Merged pull requests:**

- Remove legacy top-scope syntax [\#498](https://github.com/voxpupuli/puppet-redis/pull/498) ([smortex](https://github.com/smortex))

## [v9.3.0](https://github.com/voxpupuli/puppet-redis/tree/v9.3.0) (2023-11-14)

[Full Changelog](https://github.com/voxpupuli/puppet-redis/compare/v9.2.0...v9.3.0)
Expand Down
8 changes: 3 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ group :test do
gem 'voxpupuli-test', '~> 7.0', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'puppet_metadata', '~> 3.0', :require => false
gem 'puppet_metadata', '~> 3.5', :require => false
gem 'redis', :require => false
gem 'mock_redis', :require => false
end
Expand All @@ -18,13 +18,11 @@ group :development do
end

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

group :release do
gem 'github_changelog_generator', '>= 1.16.1', :require => false
gem 'voxpupuli-release', '~> 3.0', :require => false
gem 'faraday-retry', '~> 2.1', :require => false
gem 'voxpupuli-release', '~> 3.0', :require => false
end

gem 'rake', :require => false
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@
### Standalone

```puppet
include ::redis
include redis
```

### Master node

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

With authentication

```puppet
class { '::redis':
class { 'redis':
bind => '10.0.1.1',
masterauth => 'secret',
}
Expand All @@ -36,7 +36,7 @@ class { '::redis':
### Slave node

```puppet
class { '::redis':
class { 'redis':
bind => '10.0.1.2',
slaveof => '10.0.1.1 6379',
}
Expand All @@ -45,7 +45,7 @@ class { '::redis':
With authentication

```puppet
class { '::redis':
class { 'redis':
bind => '10.0.1.2',
slaveof => '10.0.1.1 6379',
masterauth => 'secret',
Expand All @@ -55,7 +55,7 @@ class { '::redis':
### Redis 3.0 Clustering

```puppet
class { '::redis':
class { 'redis':
bind => '10.0.1.2',
appendonly => true,
cluster_enabled => true,
Expand All @@ -70,7 +70,7 @@ class { '::redis':
```puppet
$listening_ports = [6379,6380,6381,6382]
class { '::redis':
class { 'redis':
default_install => false,
service_enable => false,
service_ensure => 'stopped',
Expand All @@ -97,15 +97,15 @@ Disabled by default but if you really want the module to manage the required
repositories you can use this snippet:

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

On Ubuntu, you can use a PPA by using the `ppa_repo` parameter:

```puppet
class { '::redis':
class { 'redis':
manage_repo => true,
ppa_repo => 'ppa:rwky/redis',
}
Expand All @@ -120,13 +120,13 @@ Optionally install and configuration a redis-sentinel server.
With default settings:

```puppet
include ::redis::sentinel
include redis::sentinel
```

With adjustments:

```puppet
class { '::redis::sentinel':
class { 'redis::sentinel':
master_name => 'cow',
redis_host => '192.168.1.5',
failover_timeout => 30000,
Expand Down
38 changes: 37 additions & 1 deletion REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ include redis
##### Slave Node

```puppet
class { '::redis':
class { 'redis':
bind => '10.0.1.2',
slaveof => '10.0.1.1 6379',
}
Expand Down Expand Up @@ -224,6 +224,7 @@ The following parameters are available in the `redis` class:
* [`jemalloc_bg_thread`](#-redis--jemalloc_bg_thread)
* [`rdb_save_incremental_fsync`](#-redis--rdb_save_incremental_fsync)
* [`dnf_module_stream`](#-redis--dnf_module_stream)
* [`acls`](#-redis--acls)
* [`manage_service_file`](#-redis--manage_service_file)

##### <a name="-redis--activerehashing"></a>`activerehashing`
Expand Down Expand Up @@ -1370,6 +1371,17 @@ that use DNF package manager, such as EL8 or Fedora.

Default value: `undef`

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

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

This is a way to pass an array of raw ACLs to Redis. The ACLs must be
in the form of:

user USERNAME [additional ACL options]

Default value: `[]`

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

Data type: `Boolean`
Expand Down Expand Up @@ -1511,6 +1523,7 @@ The following parameters are available in the `redis::sentinel` class:
* [`working_dir`](#-redis--sentinel--working_dir)
* [`notification_script`](#-redis--sentinel--notification_script)
* [`client_reconfig_script`](#-redis--sentinel--client_reconfig_script)
* [`acls`](#-redis--sentinel--acls)
* [`service_ensure`](#-redis--sentinel--service_ensure)

##### <a name="-redis--sentinel--auth_pass"></a>`auth_pass`
Expand Down Expand Up @@ -1838,6 +1851,17 @@ Path to the client-reconfig script

Default value: `undef`

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

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

This is a way to pass an array of raw ACLs to Sentinel. The ACLs must be
in the form of:

user USERNAME [additional ACL options]

Default value: `[]`

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

Data type: `Stdlib::Ensure::Service`
Expand Down Expand Up @@ -1986,6 +2010,7 @@ The following parameters are available in the `redis::instance` defined type:
* [`active_defrag_max_scan_fields`](#-redis--instance--active_defrag_max_scan_fields)
* [`jemalloc_bg_thread`](#-redis--instance--jemalloc_bg_thread)
* [`rdb_save_incremental_fsync`](#-redis--instance--rdb_save_incremental_fsync)
* [`acls`](#-redis--instance--acls)
* [`output_buffer_limit_slave`](#-redis--instance--output_buffer_limit_slave)
* [`output_buffer_limit_pubsub`](#-redis--instance--output_buffer_limit_pubsub)

Expand Down Expand Up @@ -2973,6 +2998,17 @@ the file will be fsync-ed every 32 MB of data generated.

Default value: `$redis::rdb_save_incremental_fsync`

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

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

This is a way to pass an array of raw ACLs to Redis. The ACLs must be
in the form of:

user USERNAME [additional ACL options]

Default value: `$redis::acls`

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

Data type: `String[1]`
Expand Down
1 change: 1 addition & 0 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
daemonize => $redis::daemonize,
service_name => $redis::service_name,
manage_service_file => $redis::manage_service_file,
acls => $redis::acls,
}
}

Expand Down
9 changes: 8 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# include redis
#
# @example Slave Node
# class { '::redis':
# class { 'redis':
# bind => '10.0.1.2',
# slaveof => '10.0.1.1 6379',
# }
Expand Down Expand Up @@ -329,6 +329,12 @@
# @param dnf_module_stream
# Manage the DNF module and set the version. This only makes sense on distributions
# that use DNF package manager, such as EL8 or Fedora.
# @param acls
# This is a way to pass an array of raw ACLs to Redis. The ACLs must be
# in the form of:
#
# user USERNAME [additional ACL options]
#
# @param manage_service_file
# Determine if the systemd service file should be managed
#
Expand Down Expand Up @@ -473,6 +479,7 @@
Optional[Boolean] $jemalloc_bg_thread = undef,
Optional[Boolean] $rdb_save_incremental_fsync = undef,
Optional[String[1]] $dnf_module_stream = undef,
Array[String[1]] $acls = [],
) inherits redis::params {
contain redis::preinstall
contain redis::install
Expand Down
8 changes: 8 additions & 0 deletions manifests/instance.pp
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,12 @@
# @param rdb_save_incremental_fsync
# When redis saves RDB file, if the following option is enabled
# the file will be fsync-ed every 32 MB of data generated.
# @param acls
# This is a way to pass an array of raw ACLs to Redis. The ACLs must be
# in the form of:
#
# user USERNAME [additional ACL options]
#
# @param output_buffer_limit_slave
# Value of client-output-buffer-limit-slave in redis config
# @param output_buffer_limit_pubsub
Expand Down Expand Up @@ -405,6 +411,7 @@
Integer[1] $active_defrag_max_scan_fields = $redis::active_defrag_max_scan_fields,
Optional[Boolean] $jemalloc_bg_thread = $redis::jemalloc_bg_thread,
Optional[Boolean] $rdb_save_incremental_fsync = $redis::rdb_save_incremental_fsync,
Array[String[1]] $acls = $redis::acls,
) {
if $title == 'default' {
$redis_file_name_orig = $config_file_orig
Expand Down Expand Up @@ -596,6 +603,7 @@
active_defrag_max_scan_fields => $active_defrag_max_scan_fields,
jemalloc_bg_thread => $jemalloc_bg_thread,
rdb_save_incremental_fsync => $rdb_save_incremental_fsync,
acls => $acls,
}
),
}
Expand Down
7 changes: 7 additions & 0 deletions manifests/sentinel.pp
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@
# @param client_reconfig_script
# Path to the client-reconfig script
#
# @param acls
# This is a way to pass an array of raw ACLs to Sentinel. The ACLs must be
# in the form of:
#
# user USERNAME [additional ACL options]
#
# @example Basic inclusion
# include redis::sentinel
#
Expand Down Expand Up @@ -180,6 +186,7 @@
Stdlib::Absolutepath $working_dir = $redis::params::sentinel_working_dir,
Optional[Stdlib::Absolutepath] $notification_script = undef,
Optional[Stdlib::Absolutepath] $client_reconfig_script = undef,
Array[String[1]] $acls = [],
) inherits redis::params {
$auth_pass_unsensitive = if $auth_pass =~ Sensitive {
$auth_pass.unwrap
Expand Down
Loading