diff --git a/README.md b/README.md
index 32e6fa48..6f3d00e4 100644
--- a/README.md
+++ b/README.md
@@ -133,6 +133,15 @@ class { 'redis::sentinel':
}
```
+If installation without redis-server is desired, set `manage_redis` parameter to false, i.e
+```puppet
+class { 'redis::sentinel':
+ ...
+ manage_redis => false,
+ ...
+}
+```
+
### Soft dependency
When managing the repo, it needs [puppetlabs/apt](https://forge.puppet.com/puppetlabs/apt).
diff --git a/REFERENCE.md b/REFERENCE.md
index e80e7fc5..132ec8cb 100644
--- a/REFERENCE.md
+++ b/REFERENCE.md
@@ -1594,6 +1594,7 @@ The following parameters are available in the `redis::sentinel` class:
* [`sentinel_auth_pass`](#-redis--sentinel--sentinel_auth_pass)
* [`sentinel_auth_user`](#-redis--sentinel--sentinel_auth_user)
* [`acls`](#-redis--sentinel--acls)
+* [`manage_redis`](#-redis--sentinel--manage_redis)
* [`service_ensure`](#-redis--sentinel--service_ensure)
##### `auth_pass`
@@ -1966,6 +1967,14 @@ in the form of:
Default value: `[]`
+##### `manage_redis`
+
+Data type: `Boolean`
+
+Manage redis base class. If set to false, sentinel is installed without redis server.
+
+Default value: `true`
+
##### `service_ensure`
Data type: `Stdlib::Ensure::Service`
diff --git a/manifests/sentinel.pp b/manifests/sentinel.pp
index fb7abb4d..061e92c8 100644
--- a/manifests/sentinel.pp
+++ b/manifests/sentinel.pp
@@ -150,6 +150,10 @@
#
# user USERNAME [additional ACL options]
#
+# @param manage_redis
+# Manage redis base class. If set to false, sentinel is installed without redis server.
+#
+#
# @example Basic inclusion
# include redis::sentinel
#
@@ -205,6 +209,7 @@
Optional[Variant[String[1], Sensitive[String[1]]]] $sentinel_auth_pass = undef,
Optional[String[1]] $sentinel_auth_user = undef,
Array[String[1]] $acls = [],
+ Boolean $manage_redis = true,
) inherits redis::params {
$auth_pass_unsensitive = if $auth_pass =~ Sensitive {
$auth_pass.unwrap
@@ -212,7 +217,9 @@
$auth_pass
}
- contain 'redis'
+ if $manage_redis {
+ contain 'redis'
+ }
if $package_name != $redis::package_name {
stdlib::ensure_packages([$package_name],
@@ -220,7 +227,9 @@
ensure => $package_ensure
},
)
- Package[$package_name] -> Class['redis']
+ if $manage_redis {
+ Package[$package_name] -> Class['redis']
+ }
}
Package[$package_name] -> File[$config_file_orig]