From 9c5ef0395b1298f17aa654ddda12068cc8068ae4 Mon Sep 17 00:00:00 2001 From: Chad Heuschober Date: Wed, 21 May 2014 00:46:56 -0400 Subject: [PATCH] Tightened up some ng requirements. --- php/ng/fpm/init.sls | 3 +++ php/ng/fpm/pools.sls | 15 +++++++++++---- php/ng/fpm/service.sls | 1 - 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/php/ng/fpm/init.sls b/php/ng/fpm/init.sls index 298e969..dfa63a8 100644 --- a/php/ng/fpm/init.sls +++ b/php/ng/fpm/init.sls @@ -13,3 +13,6 @@ extend: - watch: - file: php_fpm_ini_config - file: php_fpm_conf_config + - require: + - file: php_fpm_ini_config + - file: php_fpm_conf_config diff --git a/php/ng/fpm/pools.sls b/php/ng/fpm/pools.sls index c41f45c..5c3779e 100644 --- a/php/ng/fpm/pools.sls +++ b/php/ng/fpm/pools.sls @@ -3,14 +3,21 @@ {% from 'php/ng/fpm/pools_config.sls' import pool_states with context %} {% from 'php/ng/fpm/service.sls' import service_function with context %} +{% macro file_requisites(states) %} + {%- for state in states %} + - file: {{ state }} + {%- endfor -%} +{% endmacro %} + include: - php.ng.fpm.service - php.ng.fpm.pools_config + extend: php_fpm_service: - service.{{ service_function }}: + service: - watch: - {%- for pool in pool_states %} - - file: {{ pool }} - {% endfor -%} + {{ file_requisites(pool_states) }} + - require: + {{ file_requisites(pool_states) }} diff --git a/php/ng/fpm/service.sls b/php/ng/fpm/service.sls index b729ebb..45cb1f5 100644 --- a/php/ng/fpm/service.sls +++ b/php/ng/fpm/service.sls @@ -14,4 +14,3 @@ php_fpm_service: - sls: php.ng.fpm.install - watch: - pkg: php_install_fpm -