Open billglick opened 2 weeks ago
Would it be ok to include a puppet/systemd dependency to make this change or am I going about this the wrong way?
I was thinking of something like adding a drop-in file to override the service Type to simple
systemd::manage_dropin { 'influxdb.conf':
ensure => present,
unit => $service_name,
service_entry => {
'Type' => 'simple'
}
}
I think you are on the right track there, but I'm not really sure how to use the systemd
module to do what you want.
I know @jakerundall has some experience with using systemd::dropin_files
to create/update the slurmdbd.service
to run as a specific user. See the following in almost any project control repo:
systemd::dropin_files:
slurmdbd-user.conf:
unit: "slurmdbd.service"
content: |
# File managed by Puppet
[Service]
User=slurm
notify_service: true
Perhaps that can be used as a template?
We would need to test this, but MS Copilot suggested the following should work:
systemd::dropin_file { 'influxdb-override.conf':
unit => 'influxdb.service',
content => "[Service]\nType=simple\n",
notify => Service['influxdb'],
}
That could either be added into this module, or added to the project's control repo as:
systemd::dropin_files:
influxdb-override.conf:
unit: "influxdb.service"
content: |
# File managed by Puppet
[Service]
Type=simple
notify_service: true
From JD: