From 3940b1c55c92460d1d591a3e7fe91c3e24dbcbc8 Mon Sep 17 00:00:00 2001 From: Frank Wall Date: Fri, 4 Nov 2022 00:45:37 +0100 Subject: [PATCH 1/2] fix FreeBSD support --- manifests/instance.pp | 4 ++-- manifests/ulimit.pp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manifests/instance.pp b/manifests/instance.pp index 9085f061..19856f47 100644 --- a/manifests/instance.pp +++ b/manifests/instance.pp @@ -414,7 +414,7 @@ } } - if $manage_service_file { + if $manage_service_file and and $facts['service_provider'] == 'systemd' { if $title != 'default' { $real_service_ensure = $service_ensure == 'running' $real_service_enable = $service_enable @@ -453,7 +453,7 @@ ), } } else { - if $ulimit_managed { + if $ulimit_managed and $facts['service_provider'] == 'systemd' { systemd::service_limits { "${service_name}.service": limits => { 'LimitNOFILE' => $ulimit, diff --git a/manifests/ulimit.pp b/manifests/ulimit.pp index d3ac91d9..2a238968 100644 --- a/manifests/ulimit.pp +++ b/manifests/ulimit.pp @@ -17,7 +17,7 @@ class redis::ulimit { assert_private('The redis::ulimit class is only to be called from the redis::config class') - if $redis::managed_by_cluster_manager { + if $redis::managed_by_cluster_manager and $facts['kernel'] == 'Linux' { file { '/etc/security/limits.d/redis.conf': ensure => 'file', owner => 'root', From 820fc5aa6f648bc046c91377128bb5740379ed58 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Wed, 9 Nov 2022 10:48:16 +0100 Subject: [PATCH 2/2] Update instance.pp --- manifests/instance.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/instance.pp b/manifests/instance.pp index 19856f47..d53d4b05 100644 --- a/manifests/instance.pp +++ b/manifests/instance.pp @@ -414,7 +414,7 @@ } } - if $manage_service_file and and $facts['service_provider'] == 'systemd' { + if $manage_service_file and $facts['service_provider'] == 'systemd' { if $title != 'default' { $real_service_ensure = $service_ensure == 'running' $real_service_enable = $service_enable