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.

30 lines
674B

  1. {%- from "php/map.jinja" import php with context %}
  2. {%- if not 'ng' in salt['pillar.get']('php', {}) %}
  3. {%- if grains['os'] == "Ubuntu" %}
  4. {%- set use_external_repo = salt['pillar.get']('php:use_external_repo', False) %}
  5. {%- if use_external_repo %}
  6. {%- set external_repo_name = salt['pillar.get']('php:external_repo_name', 'ondrej/php') %}
  7. php_from_ppa:
  8. pkgrepo.managed:
  9. - ppa: {{ external_repo_name }}
  10. - env:
  11. - LC_ALL: "C.UTF-8"
  12. - require_in:
  13. - pkg: php_from_ppa
  14. pkg.latest:
  15. - name: {{ php.php_pkg }}
  16. - refresh: True
  17. {%- endif %}
  18. {%- endif %}
  19. php:
  20. pkg.installed:
  21. - name: {{ php.php_pkg }}
  22. {%- endif %}