Commit 18bd19ee authored by mh's avatar mh
Browse files

we still need to reload systemd otherwise puppet might try to activate the...

we still need to reload systemd otherwise puppet might try to activate the socket before the .service is loaded and we get Socket service fpm-xyz.service not loaded
parent 45d4a1cd
......@@ -15,6 +15,7 @@ define php::fpm (
$writable_dirs = [],
) {
include php::disable_mod_php
include php::fpm::systemd_daemon_reload
if $php_inst_class {
require "::php::scl::${php_inst_class}"
$etcdir = getvar("php::scl::${php_inst_class}::etcdir")
......@@ -49,7 +50,7 @@ define php::fpm (
"/etc/systemd/system/fpm-${name}.service",
]:
owner => root,
}
} ~> Exec['systemctl-daemon-reload-fpm']
if $ensure == 'present' {
include php::fpm::base
......@@ -72,7 +73,8 @@ define php::fpm (
content => template('php/fpm/systemd-service.erb'),
notify => Service["fpm-${name}"],
}
Service["fpm-${name}.socket"] {
Exec['systemctl-daemon-reload-fpm']
-> Service["fpm-${name}.socket"] {
ensure => 'running',
enable => true,
} ~> Service["fpm-${name}"] {
......
# we still need to explicitly reload it
# since the .service must be loaded by systemd
# when trying to start the .socket and puppet
# won't do these relationships automatically
class php::fpm::systemd_daemon_reload {
exec { 'systemctl-daemon-reload-fpm':
command => 'systemctl daemon-reload',
refreshonly => true,
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment