From 6e6756a9f77b9401f0acbf15019689580866a59b Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sat, 25 Apr 2015 15:18:04 +0100 Subject: [PATCH] Fix ppa support in php.ng, fixes #36 --- php/ng/installed.jinja | 16 ++++++++++++++++ php/ng/map.jinja | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/php/ng/installed.jinja b/php/ng/installed.jinja index 249423c..9c28eaf 100644 --- a/php/ng/installed.jinja +++ b/php/ng/installed.jinja @@ -20,6 +20,22 @@ {% do pkgs.append(pkginfo) %} {% 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 }}: pkg.installed: - name: {{ state }} diff --git a/php/ng/map.jinja b/php/ng/map.jinja index 02fa070..3c5f0fa 100644 --- a/php/ng/map.jinja +++ b/php/ng/map.jinja @@ -20,7 +20,7 @@ 'mysqlnd': 'php5-mysqlnd', 'pear': 'php-pear', 'soap': 'php-soap', - 'sqlite': 'php5-sqlite', + 'sqlite': 'php5-sqlite', 'xml': 'php5-xmlrpc', 'redis': 'php5-redis', 'imagick': 'php5-imagick', @@ -70,7 +70,7 @@ 'mysqlnd': 'php-mysqlnd', 'pear': 'php-pear', 'soap': 'php-soap', - 'sqlite': 'php5-sqlite', + 'sqlite': 'php5-sqlite', 'xml': 'php-xml', 'redis': 'php-redis', 'imagick': 'php-imagick',