Saltstack Official PHP Formula
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

1234567891011121314151617181920212223
  1. {% from "php/map.jinja" import php with context %}
  2. {% set modules = salt['pillar.get']('php:modules') or [] %}
  3. {% set base_name = 'php.' %}
  4. {% set existing_states = salt['cp.list_states']() %}
  5. {% set includes = [] %}
  6. {% set install = [] %}
  7. {% for module in modules %}
  8. {% set state = base_name ~ module %}
  9. {% if state in existing_states %}
  10. {% do includes.append(state) %}
  11. {% else %}
  12. {% do install.append(module) %}
  13. {% endif %}
  14. {% endfor %}
  15. include: {{ includes|json }}
  16. {% for state in install %}
  17. {% include "php/installed.jinja" %}
  18. {% endfor %}