Skip to content

Commit 3940b1c

Browse files
committed
fix FreeBSD support
1 parent 9d352b6 commit 3940b1c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

manifests/instance.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@
414414
}
415415
}
416416

417-
if $manage_service_file {
417+
if $manage_service_file and and $facts['service_provider'] == 'systemd' {
418418
if $title != 'default' {
419419
$real_service_ensure = $service_ensure == 'running'
420420
$real_service_enable = $service_enable
@@ -453,7 +453,7 @@
453453
),
454454
}
455455
} else {
456-
if $ulimit_managed {
456+
if $ulimit_managed and $facts['service_provider'] == 'systemd' {
457457
systemd::service_limits { "${service_name}.service":
458458
limits => {
459459
'LimitNOFILE' => $ulimit,

manifests/ulimit.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class redis::ulimit {
1818
assert_private('The redis::ulimit class is only to be called from the redis::config class')
1919

20-
if $redis::managed_by_cluster_manager {
20+
if $redis::managed_by_cluster_manager and $facts['kernel'] == 'Linux' {
2121
file { '/etc/security/limits.d/redis.conf':
2222
ensure => 'file',
2323
owner => 'root',

0 commit comments

Comments
 (0)