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.

1234567891011121314151617181920212223242526272829303132333435
  1. {#- Manages the php cli main ini file #}
  2. {%- set tplroot = tpldir.split('/')[0] %}
  3. {%- from tplroot ~ "/map.jinja" import php with context %}
  4. {%- from tplroot ~ "/ini.jinja" import php_ini %}
  5. {%- set settings = php.ini.defaults %}
  6. {%- for key, value in php.cli.ini.settings.items() %}
  7. {%- if settings[key] is defined %}
  8. {%- do settings[key].update(value) %}
  9. {%- else %}
  10. {%- do settings.update({key: value}) %}
  11. {%- endif %}
  12. {%- endfor %}
  13. {%- set pillar_php_version = salt['pillar.get']('php:version', '7.0') %}
  14. {%- if pillar_php_version is iterable and pillar_php_version is not string %}
  15. {%- for version in pillar_php_version %}
  16. {%- set first_version = pillar_php_version[0]|string %}
  17. {%- set ini = php.lookup.cli.ini|replace(first_version, version) %}
  18. php_cli_ini_{{ version }}:
  19. {{ php_ini(ini,
  20. 'php_cli_ini_' ~ version,
  21. php.cli.ini.opts,
  22. settings
  23. ) }}
  24. {%- endfor %}
  25. {%- else %}
  26. php_cli_ini:
  27. {{ php_ini(php.lookup.cli.ini,
  28. 'php_cli_ini',
  29. php.cli.ini.opts,
  30. settings
  31. ) }}
  32. {%- endif %}