Fix ppa support in php.ng, fixes #36

This commit is contained in:
Jordi Boggiano 2015-04-25 15:18:04 +01:00
parent 3f1bb7d964
commit 6e6756a9f7
2 changed files with 18 additions and 2 deletions

View File

@ -20,6 +20,22 @@
{% do pkgs.append(pkginfo) %} {% do pkgs.append(pkginfo) %}
{% endif %} {% endif %}
{% if grains['os_family']=="Debian" and (state == 'cli' or state == 'fpm' or state == 'php') %}
{% set use_ppa = salt['pillar.get']('php:use_ppa', none) %}
{% if use_ppa is not none %}
{% set ppa_name = salt['pillar.get']('php:ppa_name', 'ondrej/php5') %}
php_ppa_{{ state }}:
pkgrepo.managed:
- ppa: {{ ppa_name }}
pkg.latest:
- name: {{ state }}
- pkgs: {{ pkgs|json() }}
- refresh: True
{% endif %}
{% endif %}
php_install_{{ state }}: php_install_{{ state }}:
pkg.installed: pkg.installed:
- name: {{ state }} - name: {{ state }}