Skip to content

Commit bb21611

Browse files
committed
mongos: add RuntimeDirectory to systemd unit file
1 parent cd30238 commit bb21611

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

manifests/mongos/service.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666

6767
if $service_manage {
6868
systemd::unit_file { 'mongos.service':
69-
content => epp($service_template, { service_user => $service_user, service_group => $service_user }),
69+
content => epp($service_template, { service_user => $service_user, service_group => $service_group }),
7070
enable => $real_service_enable,
7171
} ~> Service['mongos']
7272

spec/classes/mongos_spec.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,14 @@
3232

3333
# service
3434
it { is_expected.to contain_class('mongodb::mongos::service') }
35+
3536
it { is_expected.to contain_service('mongos') }
37+
38+
it {
39+
is_expected.to contain_systemd__unit_file('mongos.service')
40+
.with_content(%r{RuntimeDirectory=mongodb})
41+
.with_content(%r{RuntimeDirectoryMode=0755})
42+
}
3643
end
3744

3845
describe 'with specific bind_ip values' do

templates/mongos/mongos.service-dropin.epp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Documentation=https://docs.mongodb.org/manual
99
After=network.target
1010

1111
[Service]
12+
RuntimeDirectory=mongodb
13+
RuntimeDirectoryMode=0755
1214
User=<%= $service_user %>
1315
Group=<%= $service_group %>
1416
Environment="OPTIONS=-f /etc/mongos.conf"

0 commit comments

Comments
 (0)