Saltstack Official PHP Formula
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

pools_config.sls 762B

123456789101112131415161718192021222324252627282930313233
  1. # Manages the php-fpm pools config files
  2. {% from 'php/ng/map.jinja' import php, sls_block with context %}
  3. # Simple path concatenation.
  4. {% macro path_join(file, root) -%}
  5. {{ root ~ '/' ~ file }}
  6. {%- endmacro %}
  7. {% set pool_states = [] %}
  8. {% for pool, config in php.fpm.pools.managed.items() %}
  9. {% set state = 'php_fpm_pool_conf_' ~ loop.index0 %}
  10. {% set fpath = path_join(pool, php.lookup.fpm.pools) %}
  11. {{ state }}:
  12. {% if config.enabled %}
  13. file.managed:
  14. {{ sls_block(php.fpm.pools.managed_opts) }}
  15. - name: {{ fpath }}
  16. - source: salt://php/ng/files/php.ini
  17. - template: jinja
  18. - context:
  19. config: {{ config.settings }}
  20. {% else %}
  21. file.absent:
  22. - name: {{ fpath }}
  23. {% endif %}
  24. {% do pool_states.append(state) %}
  25. {% endfor %}