Saltstack Official PHP Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 line
875B

  1. # Manages the php-fpm pools config files
  2. {% from "php/map.jinja" import php with context %}
  3. {% from "php/macro.jinja" import sls_block %}
  4. {% from "php/macro.jinja" import file_requisites %}
  5. {% from "php/fpm/pools_config.sls" import pool_states with context %}
  6. include:
  7. - php.fpm.service
  8. - php.fpm.pools_config
  9. {% set pillar_php_version = salt['pillar.get']('php:version', '7.0') %}
  10. {% if pool_states %}
  11. extend:
  12. {% if pillar_php_version is iterable and pillar_php_version is not string %}
  13. {% for version in pillar_php_version %}
  14. php_fpm_service_{{ version }}:
  15. service:
  16. - watch:
  17. {{ file_requisites(pool_states) }}
  18. - require:
  19. {{ file_requisites(pool_states) }}
  20. {% endfor %}
  21. {% else %}
  22. php_fpm_service:
  23. service:
  24. - watch:
  25. {{ file_requisites(pool_states) }}
  26. - require:
  27. {{ file_requisites(pool_states) }}
  28. {% endif %}
  29. {% endif %}