Skip to content

Commit

Permalink
Merge pull request #1005 from voxpupuli/modulesync
Browse files Browse the repository at this point in the history
modulesync 9.0.0
  • Loading branch information
bastelfreak authored Jun 12, 2024
2 parents 381dcc0 + fc7cda0 commit 4ac2098
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 19 deletions.
3 changes: 3 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
skip-changelog:
- head-branch: ['^release-*', 'release']
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: '8.0.1'
modulesync_config_version: '9.0.0'
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
source ENV['GEM_SOURCE'] || 'https://rubygems.org'

group :test do
gem 'voxpupuli-test', '~> 7.2', :require => false
gem 'voxpupuli-test', '~> 8.0', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'puppet_metadata', '~> 4.0', :require => false
Expand Down
2 changes: 1 addition & 1 deletion REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ Default value: `undef`

Data type: `Variant[Integer[-1],Enum['unlimited'],Pattern[/^(infinity|\d+(:(infinity|\d+))?)$/]]`

Set rabbitmq file ulimit. Defaults to 16384. Only available on systems with systemd
Set rabbitmq file ulimit. Defaults to 16384. Only available on Linux

Default value: `16384`

Expand Down
2 changes: 1 addition & 1 deletion manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@
}
}
if $facts['systemd'] { # systemd fact provided by systemd module
if $facts['kernel'] == 'Linux' {
systemd::manage_dropin { 'service-90-limits.conf':
unit => "${service_name}.service",
selinux_ignore_defaults => ($facts['os']['family'] == 'RedHat'),
Expand Down
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
# set explicitly if using clustering. If you run Pacemaker and you don't want to use RabbitMQ buildin cluster, you can set config_cluster
# to 'False' and set 'erlang_cookie'.
# @param file_limit
# Set rabbitmq file ulimit. Defaults to 16384. Only available on systems with systemd
# Set rabbitmq file ulimit. Defaults to 16384. Only available on Linux
# @param oom_score_adj
# Set rabbitmq-server process OOM score. Defaults to 0.
# @param heartbeat
Expand Down
3 changes: 0 additions & 3 deletions manifests/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,5 @@
hasrestart => true,
name => $service_name,
}
if $facts['systemd'] and defined(Class['systemd::systemctl::daemon_reload']) {
Class['systemd::systemctl::daemon_reload'] -> Service['rabbitmq-server']
}
}
}
15 changes: 4 additions & 11 deletions spec/classes/rabbitmq_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
end

['infinity', -1, 1234].each do |value|
context "with file_limit => '#{value}'", if: os_facts['systemd'] do
context "with file_limit => '#{value}'", if: os_facts['kernel'] == 'Linux' do
let(:params) { { file_limit: value } }

selinux_ignore_defaults = os_facts[:os]['family'] == 'RedHat'
Expand All @@ -143,7 +143,7 @@
end

[-1000, 0, 1000].each do |value|
context "with oom_score_adj => '#{value}'", if: os_facts['systemd'] do
context "with oom_score_adj => '#{value}'", if: os_facts[:kernel] == 'Linux' do
let(:params) { { oom_score_adj: value } }

it { is_expected.to contain_systemd__manage_dropin('service-90-limits.conf').with_service_entry({ 'LimitNOFILE' => 16_384, 'OOMScoreAdjust' => value }) }
Expand All @@ -160,11 +160,11 @@
end
end

context 'on systems with systemd', if: os_facts['systemd'] do
context 'on Linux', if: os_facts[:kernel] == 'Linux' do
it { is_expected.to contain_systemd__manage_dropin('service-90-limits.conf') }
end

context 'on systems without systemd', unless: os_facts['systemd'] do
context 'on non-Linux', unless: os_facts[:kernel] == 'Linux' do
it { is_expected.not_to contain_systemd__manage_dropin('service-90-limits.conf') }
end

Expand Down Expand Up @@ -1747,13 +1747,6 @@
}
end

context 'on systems with systemd', if: os_facts[:systemd] do
it do
is_expected.to contain_service('rabbitmq-server').
that_requires('Class[systemd::systemctl::daemon_reload]')
end
end

describe 'service with ensure stopped' do
let :params do
{ service_ensure: 'stopped' }
Expand Down

0 comments on commit 4ac2098

Please sign in to comment.