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.

45 lines
1.1KB

  1. # Meta-state to fully install php.fpm
  2. include:
  3. - php.fpm.config
  4. - php.fpm.service
  5. - php.fpm.pools
  6. {% set pillar_php_version = salt['pillar.get']('php:version', '7.0') %}
  7. extend:
  8. php_fpm_service:
  9. service:
  10. - watch:
  11. {% if pillar_php_version is iterable and pillar_php_version is not string %}
  12. {% for version in pillar_php_version %}
  13. - file: php_fpm_ini_config_{{ version }}
  14. - file: php_fpm_conf_config_{{ version }}
  15. {% endfor %}
  16. {% else %}
  17. - file: php_fpm_ini_config
  18. - file: php_fpm_conf_config
  19. {% endif %}
  20. - require:
  21. - sls: php.fpm.config
  22. {% if pillar_php_version is iterable and pillar_php_version is not string %}
  23. {% for version in pillar_php_version %}
  24. php_fpm_ini_config_{{ version }}:
  25. file:
  26. - require:
  27. - pkg: php_install_fpm
  28. php_fpm_conf_config_{{ version }}:
  29. file:
  30. - require:
  31. - pkg: php_install_fpm
  32. {% endfor %}
  33. {% else %}
  34. php_fpm_ini_config:
  35. file:
  36. - require:
  37. - pkg: php_install_fpm
  38. php_fpm_conf_config:
  39. file:
  40. - require:
  41. - pkg: php_install_fpm
  42. {% endif %}