php-formula/php/ng/fpm/pools.sls

25 lines
588 B
Plaintext
Raw Normal View History

2014-05-20 21:59:25 +02:00
# Manages the php-fpm pools config files
{% from "php/ng/map.jinja" import php with context %}
{% from "php/ng/macro.jinja" import sls_block %}
{% from "php/ng/fpm/pools_config.sls" import pool_states with context %}
2014-05-20 21:59:25 +02:00
2014-05-21 06:46:56 +02:00
{% macro file_requisites(states) %}
{%- for state in states %}
- file: {{ state }}
{%- endfor -%}
{% endmacro %}
2014-05-20 21:59:25 +02:00
include:
- php.ng.fpm.service
- php.ng.fpm.pools_config
{% if pool_states %}
2014-05-20 21:59:25 +02:00
extend:
php_fpm_service:
2014-05-21 06:46:56 +02:00
service:
2014-05-20 21:59:25 +02:00
- watch:
{{ file_requisites(pool_states) }}
2014-05-21 06:46:56 +02:00
- require:
{{ file_requisites(pool_states) }}
{% endif %}