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.

преди 10 години
преди 7 години
преди 7 години
преди 7 години
преди 7 години
12345678910111213141516171819202122232425262728
  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 pillar_php_ng_version = salt['pillar.get']('php:ng:version', '7.0') %}
  6. {% if pillar_php_ng_version is iterable and pillar_php_ng_version is not string %}
  7. {% if 'alternatives_version' in salt['pillar.get']('php:ng') %}
  8. {% set phpng_version = salt['pillar.get']('php:ng:alternatives_version') %}
  9. {% else %}
  10. {% set phpng_version = false %}
  11. {% endif %}
  12. {% else %}
  13. {% set phpng_version = salt['pillar.get']('php:ng:version', '7.0')|string %}
  14. {% endif %}
  15. {% if phpng_version %}
  16. php_{{ phpng_version }}_link:
  17. alternatives.set:
  18. - name: php
  19. - path: /usr/bin/php{{ phpng_version }}
  20. - require_in:
  21. - pkg: php_install_{{ state }}
  22. - onlyif:
  23. - which php
  24. - test {{ current_php }} != $(which php{{ phpng_version }})
  25. {% endif %}
  26. {% endif %}