Skip to content

Commit

Permalink
replace systemd::service_limits with systemd::manage_dropin (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
saz authored May 20, 2024
1 parent 4071e5b commit 5c57896
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 1 addition & 3 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@ fixtures:
stdlib: 'https://github.com/puppetlabs/puppetlabs-stdlib.git'
svcprop: 'https://github.com/bolthole/puppet-svcprop.git'
selinux: 'https://github.com/voxpupuli/puppet-selinux.git'
systemd:
repo: 'https://github.com/camptocamp/puppet-systemd.git'
ref: '2.12.0'
systemd: 'https://github.com/camptocamp/puppet-systemd.git'
7 changes: 5 additions & 2 deletions manifests/instance.pp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@
}

if $limits {
systemd::service_limits { $service_name:
limits => $limits,
systemd::manage_dropin { "${service_name}-90-limits.conf":
unit => $service_name,
filename => '90-limits.conf',
notify_service => true,
service_entry => $limits,
}
}

Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dependencies": [
{"name":"puppetlabs/stdlib","version_requirement":">= 4.13.1 < 10.0.0"},
{"name":"puppetlabs/firewall","version_requirement":">= 0.1.0 < 9.0.0"},
{"name":"puppet/systemd","version_requirement":">= 2.10.0 < 8.0.0"},
{"name":"puppet/systemd","version_requirement":">= 6.0.0 < 8.0.0"},
{"name":"puppet/selinux","version_requirement":">= 3.2.0 < 5.0.0"}
],
"operatingsystem_support": [
Expand Down
2 changes: 1 addition & 1 deletion spec/defines/instance_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
it { is_expected.to contain_class('memcached::instance::servicefile') }
it { is_expected.to contain_service('memcached@3489.service') }
it { is_expected.to contain_systemd__unit_file('memcached@.service') }
it { is_expected.to contain_systemd__Service_limits('memcached@3489.service') }
it { is_expected.to contain_systemd__Manage_dropin('memcached@3489.service-90-limits.conf') }
end

context 'with overrides' do
Expand Down

0 comments on commit 5c57896

Please sign in to comment.