2019-08-07 17:01:55 +02:00
|
|
|
# Manages the php-fpm pools config files
|
|
|
|
{% from "php/map.jinja" import php with context %}
|
|
|
|
{% from "php/macro.jinja" import sls_block %}
|
2019-09-04 00:35:10 +02:00
|
|
|
{% from "php/macro.jinja" import file_requisites %}
|
2019-08-07 17:01:55 +02:00
|
|
|
{% from "php/fpm/pools_config.sls" import pool_states with context %}
|
|
|
|
|
|
|
|
include:
|
|
|
|
- php.fpm.service
|
|
|
|
- php.fpm.pools_config
|
|
|
|
|
2019-09-04 01:08:56 +02:00
|
|
|
{% set pillar_php_version = salt['pillar.get']('php:version', '7.0') %}
|
|
|
|
|
2019-08-07 17:01:55 +02:00
|
|
|
{% if pool_states %}
|
|
|
|
extend:
|
2019-09-04 01:08:56 +02:00
|
|
|
|
|
|
|
{% if pillar_php_version is iterable and pillar_php_version is not string %}
|
|
|
|
{% for version in pillar_php_version %}
|
|
|
|
php_fpm_service_{{ version }}:
|
|
|
|
service:
|
|
|
|
- watch:
|
|
|
|
{{ file_requisites(pool_states) }}
|
|
|
|
- require:
|
|
|
|
{{ file_requisites(pool_states) }}
|
|
|
|
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
{% else %}
|
|
|
|
|
2019-08-07 17:01:55 +02:00
|
|
|
php_fpm_service:
|
|
|
|
service:
|
|
|
|
- watch:
|
|
|
|
{{ file_requisites(pool_states) }}
|
|
|
|
- require:
|
|
|
|
{{ file_requisites(pool_states) }}
|
2019-09-04 01:08:56 +02:00
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
2019-08-07 17:01:55 +02:00
|
|
|
{% endif %}
|