From 2e2ef4e52969a1b867fcaa758e3af835d6964ef4 Mon Sep 17 00:00:00 2001 From: kurt--- Date: Fri, 5 May 2017 17:47:53 +0200 Subject: [PATCH 1/2] remove update-alternatives because it should only be set for the cli-state --- php/ng/installed.jinja | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/php/ng/installed.jinja b/php/ng/installed.jinja index 853e6b6..14e0028 100644 --- a/php/ng/installed.jinja +++ b/php/ng/installed.jinja @@ -47,16 +47,6 @@ php_ppa_{{ state }}: - onchanges: - pkgrepo: php_ppa_{{ state }} -php_{{ phpng_version }}_link: - alternatives.set: - - name: php - - path: /usr/bin/php{{ phpng_version }} - - require_in: - - pkg: php_install_{{ state }} - - onlyif: - - which php - - test {{ current_php }} != $(which php{{ phpng_version }}) - {% endif %} {% endif %} From e63b22c354212608049daa228c50ca38ec9c41ae Mon Sep 17 00:00:00 2001 From: kurt--- Date: Fri, 5 May 2017 17:48:47 +0200 Subject: [PATCH 2/2] update-alternatives is only required for php-cli --- php/ng/cli/install.sls | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/php/ng/cli/install.sls b/php/ng/cli/install.sls index c52a6ef..85ddf78 100644 --- a/php/ng/cli/install.sls +++ b/php/ng/cli/install.sls @@ -1,2 +1,13 @@ {% set state = 'cli' %} {% include "php/ng/installed.jinja" %} + + +php_{{ phpng_version }}_link: + alternatives.set: + - name: php + - path: /usr/bin/php{{ phpng_version }} + - require_in: + - pkg: php_install_{{ state }} + - onlyif: + - which php + - test {{ current_php }} != $(which php{{ phpng_version }})