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.

installed.jinja 650B

123456789101112131415161718192021222324252627
  1. # Template for installing packages.
  2. {% from "php/ng/map.jinja" import php with context %}
  3. {% from "php/ng/macro.jinja" import sls_block %}
  4. {% set pkginfo = php.lookup.pkgs.get(state) %}
  5. {%- if pkginfo is mapping -%}
  6. {%- for pkg, opts in pkginfo.items() -%}
  7. php_install_{{ state }}_{{ pkg }}:
  8. pkg.installed:
  9. {{ sls_block(opts) }}
  10. - name: {{ state }}
  11. {%- endfor -%}
  12. {%- else -%}
  13. {%- if pkginfo is not sequence or pkginfo is string -%}
  14. {% set pkginfo = [pkginfo] %}
  15. {%- endif -%}
  16. php_install_{{ state }}:
  17. pkg.installed:
  18. - name: {{ state }}
  19. - pkgs: {{ php.lookup.pkgs.get(state)|json() }}
  20. {%- endif -%}