Showing with 529 additions and 996 deletions.
  1. +1 −3 .fixtures.yml
  2. +3 −4 .github/CONTRIBUTING.md
  3. +75 −0 .github/workflows/ci.yml
  4. +29 −0 .github/workflows/release.yml
  5. +2 −1 .msync.yml
  6. +1 −1 .overcommit.yml
  7. +15 −2 .pmtignore
  8. +1 −0 .rubocop.yml
  9. +1 −26 .sync.yml
  10. +0 −108 .travis.yml
  11. +42 −1 CHANGELOG.md
  12. +6 −21 Gemfile
  13. +3 −3 README.md
  14. +40 −85 REFERENCE.md
  15. +8 −1 Rakefile
  16. +2 −2 lib/puppet/functions/redis/get.rb
  17. +8 −15 manifests/administration.pp
  18. +1 −12 manifests/config.pp
  19. +25 −12 manifests/init.pp
  20. +43 −81 manifests/instance.pp
  21. +15 −12 manifests/params.pp
  22. +0 −11 manifests/preinstall.pp
  23. +8 −30 manifests/sentinel.pp
  24. +2 −5 manifests/service.pp
  25. +3 −47 manifests/ulimit.pp
  26. +5 −11 metadata.json
  27. +1 −1 spec/acceptance/redis_cli_task_spec.rb
  28. +0 −4 spec/acceptance/suites/default/redis_adminstration_spec.rb
  29. +1 −1 spec/acceptance/suites/default/redis_multi_instances_one_host_spec.rb
  30. +0 −9 spec/classes/redis_administration_spec.rb
  31. +47 −1 spec/classes/redis_sentinel_spec.rb
  32. +100 −94 spec/classes/redis_spec.rb
  33. +3 −17 spec/defines/instance_spec.rb
  34. +14 −77 spec/spec_helper.rb
  35. +0 −2 spec/spec_helper_acceptance.rb
  36. +7 −0 spec/type_aliases/loglevel_spec.rb
  37. +7 −0 spec/type_aliases/redisurl_spec.rb
  38. +5 −2 templates/redis-sentinel.conf.erb
  39. +0 −89 templates/redis-sentinel.init.erb
  40. +3 −0 templates/redis.conf.erb
  41. +0 −101 templates/service_templates/redis.Debian.erb
  42. +0 −104 templates/service_templates/redis.RedHat.erb
  43. +2 −0 templates/service_templates/redis.service.erb
4 changes: 1 addition & 3 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,4 @@ fixtures:
yumrepo_core:
repo: "https://github.com/puppetlabs/puppetlabs-yumrepo_core"
puppet_version: ">= 6.0.0"
systemd:
repo: 'https://github.com/camptocamp/puppet-systemd.git'
puppet_version: "< 6.1.0"
systemd: 'https://github.com/camptocamp/puppet-systemd.git'
7 changes: 3 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,14 @@ simple tests against it after applying the module. You can run this
with:

```sh
bundle exec rake acceptance
bundle exec rake beaker
```

This will run the tests on the module's default nodeset. You can override the
nodeset used, e.g.,

```sh
BEAKER_set=centos-7-x64 bundle exec rake acceptance
BEAKER_set=centos-7-x64 bundle exec rake beaker
```

There are default rake tasks for the various acceptance test modules, e.g.,
Expand All @@ -266,10 +266,9 @@ The following strings are known to work:

* ubuntu1604
* ubuntu1804
* debian8
* ubuntu2004
* debian9
* debian10
* centos6
* centos7
* centos8

Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: CI

on: pull_request

jobs:
setup_matrix:
name: 'Setup Test Matrix'
runs-on: ubuntu-latest
outputs:
beaker_setfiles: ${{ steps.get-outputs.outputs.beaker_setfiles }}
puppet_major_versions: ${{ steps.get-outputs.outputs.puppet_major_versions }}
puppet_unit_test_matrix: ${{ steps.get-outputs.outputs.puppet_unit_test_matrix }}
env:
BUNDLE_WITHOUT: development:test:release
steps:
- uses: actions/checkout@v2
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
- name: Run rake validate
run: bundle exec rake validate
- name: Setup Test Matrix
id: get-outputs
run: bundle exec metadata2gha --use-fqdn --pidfile-workaround false

unit:
needs: setup_matrix
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include: ${{fromJson(needs.setup_matrix.outputs.puppet_unit_test_matrix)}}
env:
BUNDLE_WITHOUT: development:system_tests:release
PUPPET_VERSION: "~> ${{ matrix.puppet }}.0"
name: Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }})
steps:
- uses: actions/checkout@v2
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rake

acceptance:
needs: setup_matrix
runs-on: ubuntu-latest
env:
BUNDLE_WITHOUT: development:test:release
strategy:
fail-fast: false
matrix:
setfile: ${{fromJson(needs.setup_matrix.outputs.beaker_setfiles)}}
puppet: ${{fromJson(needs.setup_matrix.outputs.puppet_major_versions)}}
name: ${{ matrix.puppet.name }} - ${{ matrix.setfile.name }}
steps:
- name: Enable IPv6 on docker
run: |
echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
sudo service docker restart
- uses: actions/checkout@v2
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
- name: Run tests
run: bundle exec rake beaker
env:
BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet.collection }}
BEAKER_setfile: ${{ matrix.setfile.value }}
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release

on:
push:
tags:
- '*'

env:
BUNDLE_WITHOUT: development:test:system_tests

jobs:
deploy:
name: 'deploy to forge'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
- name: Build and Deploy
env:
# Configure secrets here:
# https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets
BLACKSMITH_FORGE_USERNAME: '${{ secrets.PUPPET_FORGE_USERNAME }}'
BLACKSMITH_FORGE_API_KEY: '${{ secrets.PUPPET_FORGE_API_KEY }}'
run: bundle exec rake module:push
3 changes: 2 additions & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
modulesync_config_version: '3.0.0'
---
modulesync_config_version: '4.0.0'
2 changes: 1 addition & 1 deletion .overcommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ PrePush:
- 'validate'
- 'test'
- 'rubocop'
command: [ 'bundle', 'exec', 'rake' ]
command: ['bundle', 'exec', 'rake']
17 changes: 15 additions & 2 deletions .pmtignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
docs/
pkg/
Gemfile
Gemfile.lock
Gemfile.local
vendor/
.vendor/
spec/fixtures/manifests/
spec/fixtures/modules/
spec/
Rakefile
.vagrant/
.bundle/
.ruby-version
coverage/
log/
.idea/
.dependencies/
.github/
.librarian/
Puppetfile.lock
*.iml
.editorconfig
.fixtures.yml
.gitignore
.msync.yml
.overcommit.yml
.pmtignore
.rspec
.rspec_parallel
.rubocop.yml
.sync.yml
.*.sw?
.yardoc/
.yardopts
Dockerfile
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
inherit_gem:
voxpupuli-test: rubocop.yml
27 changes: 1 addition & 26 deletions .sync.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,8 @@
---
.travis.yml:
secure: "lmmQ5+ueE39cDevK+TjJWgD7b9X6FQDoyL/OTRXzOuCu/96yXQrm/KBq4E2IsFTx91XiqOH6ZnKcgiGwaY54E10ddTvlZhEa8orMmwfkrLAbyh7POB1q3AtQze7RPLvOuHZc6XIRBDiiFKMrzvwdP5OgU9iPEFdSRZll64nw240="
docker_sets:
- set: ubuntu1604-64m
- set: ubuntu1804-64m
- set: ubuntu2004-64m
- set: centos6-64m
- set: centos7-64m
- set: centos8-64m
- set: debian9-64m
- set: debian10-64m
Gemfile:
optional:
':test':
- gem: 'redis'
- gem: 'mock_redis'
spec/spec_helper.rb:
unmanaged: true
spec/acceptance/nodesets/ec2/amazonlinux-2016091.yml:
delete: true
spec/acceptance/nodesets/ec2/image_templates.yaml:
delete: true
spec/acceptance/nodesets/ec2/rhel-73-x64.yml:
delete: true
spec/acceptance/nodesets/ec2/sles-12sp2-x64.yml:
delete: true
spec/acceptance/nodesets/ec2/ubuntu-1604-x64.yml:
delete: true
spec/acceptance/nodesets/ec2/windows-2016-base-x64.yml:
delete: true
spec/acceptance/nodesets/archlinux-2-x64.yml:
delete: true
mock_with: ":mocha"
108 changes: 0 additions & 108 deletions .travis.yml

This file was deleted.

43 changes: 42 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,47 @@ 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.

## [v7.0.0](https://github.com/voxpupuli/puppet-redis/tree/v7.0.0) (2021-04-28)

[Full Changelog](https://github.com/voxpupuli/puppet-redis/compare/v6.1.0...v7.0.0)

**Breaking changes:**

- Remove support for THP in Redis module - recommend forge module [\#385](https://github.com/voxpupuli/puppet-redis/pull/385) ([dom-nie](https://github.com/dom-nie))
- Drop sysinit /CentOS 6 support [\#382](https://github.com/voxpupuli/puppet-redis/pull/382) ([ekohl](https://github.com/ekohl))
- Make augeasproviders\_sysctl a soft dependency [\#377](https://github.com/voxpupuli/puppet-redis/pull/377) ([ekohl](https://github.com/ekohl))
- Move package parameters to init.pp [\#374](https://github.com/voxpupuli/puppet-redis/pull/374) ([ekohl](https://github.com/ekohl))

**Implemented enhancements:**

- Declare Puppet 7 support [\#400](https://github.com/voxpupuli/puppet-redis/pull/400) ([ekohl](https://github.com/ekohl))
- Set ulimit via systemd using camptocamp/systemd [\#396](https://github.com/voxpupuli/puppet-redis/pull/396) ([ekohl](https://github.com/ekohl))
- puppetlabs/stdlib: Allow 7.x [\#394](https://github.com/voxpupuli/puppet-redis/pull/394) ([bastelfreak](https://github.com/bastelfreak))
- Allow relative paths for $log\_file [\#387](https://github.com/voxpupuli/puppet-redis/pull/387) ([ekohl](https://github.com/ekohl))
- Add support for rename-command in redis.conf [\#383](https://github.com/voxpupuli/puppet-redis/pull/383) ([carlhals](https://github.com/carlhals))
- enable sentinel bind usage with multi ip [\#365](https://github.com/voxpupuli/puppet-redis/pull/365) ([ragingdave](https://github.com/ragingdave))
- Make protected-mode configurable for sentinel [\#272](https://github.com/voxpupuli/puppet-redis/pull/272) ([eliskovets](https://github.com/eliskovets))

**Fixed bugs:**

- Set the correct log dir on RH SCL [\#379](https://github.com/voxpupuli/puppet-redis/pull/379) ([ekohl](https://github.com/ekohl))
- Drop dotdeb repo management support [\#371](https://github.com/voxpupuli/puppet-redis/pull/371) ([ekohl](https://github.com/ekohl))
- Correct config\_dir for scl support [\#353](https://github.com/voxpupuli/puppet-redis/pull/353) ([markasammut](https://github.com/markasammut))

**Closed issues:**

- Make ulimit optional or use puppet-systemd for dropin [\#390](https://github.com/voxpupuli/puppet-redis/issues/390)
- After a reboot THP \(Transparent Huge Pages\) are enabled again [\#372](https://github.com/voxpupuli/puppet-redis/issues/372)
- File descriptor limit is not set in systemd unit file by default. [\#349](https://github.com/voxpupuli/puppet-redis/issues/349)
- Redhat SCL Config\_Dir Issue [\#341](https://github.com/voxpupuli/puppet-redis/issues/341)
- \[Feature Request\] Add `rename-command` [\#242](https://github.com/voxpupuli/puppet-redis/issues/242)
- Undefined variable 'redis\_server\_version' warning on first run [\#227](https://github.com/voxpupuli/puppet-redis/issues/227)

**Merged pull requests:**

- Make spec\_helper.rb managed again [\#380](https://github.com/voxpupuli/puppet-redis/pull/380) ([ekohl](https://github.com/ekohl))
- Add type alias tests to data types [\#366](https://github.com/voxpupuli/puppet-redis/pull/366) ([ekohl](https://github.com/ekohl))

## [v6.1.0](https://github.com/voxpupuli/puppet-redis/tree/v6.1.0) (2020-09-11)

[Full Changelog](https://github.com/voxpupuli/puppet-redis/compare/v6.0.0...v6.1.0)
Expand Down Expand Up @@ -110,7 +151,7 @@ These should not affect the functionality of the module.

**Implemented enhancements:**

- Add service\_enable parameter to sentinel.pp [\#307](https://github.com/voxpupuli/puppet-redis/pull/307) ([rschemm](https://github.com/rschemm))
- Add service\_enable parameter to sentinel.pp [\#307](https://github.com/voxpupuli/puppet-redis/pull/307) ([rschemm-godaddy](https://github.com/rschemm-godaddy))

**Closed issues:**

Expand Down
Loading