jms1
01/12/2023, 6:42 PMExecReload=/bin/kill -s HUP ... linenatemccurdy
01/12/2023, 6:43 PMjms1
01/12/2023, 6:43 PMexec which runs a systemctl reload commandnatemccurdy
01/12/2023, 6:43 PMCVQuesty
01/12/2023, 6:44 PMflags => feature some kind of way?bastelfreak
01/12/2023, 6:44 PMjms1
01/12/2023, 6:44 PMjms1
01/12/2023, 6:45 PMflags => ... did that exist in puppet 4.5.2? (yes, i'm still stuck in the stone ages)natemccurdy
01/12/2023, 6:46 PMservice, and ones that only need a reload refresh the exec.
And then you have to live with the fact that you might get a restart followed by a reload.
Which, if the service being reloaded is written well, that extra reload at the end shouldn't be a problem.natemccurdy
01/12/2023, 6:46 PMnatemccurdy
01/12/2023, 6:46 PMCVQuesty
01/12/2023, 6:47 PMjms1
01/12/2023, 6:47 PMnatemccurdy
01/12/2023, 6:50 PMonlyif script that checks the lifetime of the systemd service. If it's less than x seconds, don't reload. But that creates new problems, so I'm not sure I'd do that.natemccurdy
01/12/2023, 6:50 PMonlyif script that checks the lifetime of the systemd service. If it's less than x seconds, don't reload. But that's not fool proof.natemccurdy
01/12/2023, 6:52 PMonlyif script that checks the lifetime of the systemd service. If it's less than x seconds, don't reload. But that creates new problems, so I'm not sure I'd do that.jms1
01/12/2023, 6:52 PMSlackbot
01/12/2023, 6:55 PMramindk
01/12/2023, 6:55 PMclass squid {
include squid::install, squid::config, squid::service, squid::restart
Class['squid::install']
-> Class['squid::config']
~> Class['squid::service']
-> Class['squid::restart']
class squid::config {
file { '/etc/squid/squid.conf':
content => template(squid/squid.conf.erb),
notify => Class['squid::restart'],
}
file { '/etc/squid/acls.conf':
content => template(squid/squid.acl.erb),
}
}
class squid::restart {
exec { 'squid restart': command => 'service squid restart', refreshonly => true, }
}Joel Wilson
01/12/2023, 6:56 PMnatemccurdy
01/12/2023, 6:57 PMnatemccurdy
01/12/2023, 6:57 PMvchepkov
01/12/2023, 7:00 PMjms1
01/12/2023, 7:02 PMramindk
01/12/2023, 7:05 PMnatemccurdy
01/12/2023, 7:07 PMexec "before" the service.
So if both get refreshed, Puppet would reload first then restart.natemccurdy
01/12/2023, 7:08 PMvchepkov
01/12/2023, 7:08 PMservice { $stuff:
hasrestart => true,
restart => "systemctl reload ${stuff}.service",
}
exec { "${stuff} service full restart" :
command => "systemctl restart ${stuff}.service",
refreshonly => true,
onlyif => "systemctl is-active ${stuff}.service",
before => Service[$stuff],
}jms1
01/12/2023, 7:08 PMnatemccurdy
01/12/2023, 7:08 PM