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

1234567891011121314151617
  1. {% set state = 'cli' %}
  2. {% include "php/ng/installed.jinja" %}
  3. {%- if salt['grains.get']('os_family') == "Debian" %}
  4. {% set current_php = salt['alternatives.show_current']('php') %}
  5. {% set phpng_version = salt['pillar.get']('php:ng:version', '7.0')|string %}
  6. php_{{ phpng_version }}_link:
  7. alternatives.set:
  8. - name: php
  9. - path: /usr/bin/php{{ phpng_version }}
  10. - require_in:
  11. - pkg: php_install_{{ state }}
  12. - onlyif:
  13. - which php
  14. - test {{ current_php }} != $(which php{{ phpng_version }})
  15. {% endif %}