From a3bd46ca544682cc91dffc919dce7740b0fe6749 Mon Sep 17 00:00:00 2001 From: Sean Molenaar Date: Wed, 10 Oct 2018 12:00:42 +0200 Subject: [PATCH] feat(php-fpm): restart php-fpm after an extension install --- php/installed.jinja | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/php/installed.jinja b/php/installed.jinja index 46f037fd..dbb0015e 100644 --- a/php/installed.jinja +++ b/php/installed.jinja @@ -109,6 +109,15 @@ php_install_{{ state }}: - enablerepo: {{ enable_php_repo }} {% endif %} +{% set service = salt['pillar.get']('php:lookup:fpm:service', 'php-fpm') %} +{% if salt['service.status'](service, False) %} +{{ service }}_restart_{{ state }}: + service.running: + - name: {{ service }} + - watch: + - pkg: php_install_{{ state }} +{% endif %} + {% for pkg in specials %} php_install_{{ state }}_{{ pkg.get('name') | replace("/", "-") }}: