Saltstack Official PHP Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
568B

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