From 378b5b1d378f1ba90563af67ae2bf356597638a0 Mon Sep 17 00:00:00 2001 From: Nicolas Rodriguez Date: Tue, 27 Aug 2019 00:05:26 +0200 Subject: [PATCH] fix(pillar): fix pillar.get still looking under 'ng' namespace --- php/cli/ini.sls | 8 ++++---- php/fpm/config.sls | 8 ++++---- php/fpm/init.sls | 10 +++++----- php/fpm/pools_config.sls | 6 +++--- php/installed.jinja | 14 +++++++------- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/php/cli/ini.sls b/php/cli/ini.sls index d827408..58d13f5 100644 --- a/php/cli/ini.sls +++ b/php/cli/ini.sls @@ -11,10 +11,10 @@ {% endif %} {% endfor %} -{% set pillar_php_ng_version = salt['pillar.get']('php:ng:version', '7.0') %} -{% if pillar_php_ng_version is iterable and pillar_php_ng_version is not string %} - {% for version in pillar_php_ng_version %} - {% set first_version = pillar_php_ng_version[0]|string %} +{% set pillar_php_version = salt['pillar.get']('php:version', '7.0') %} +{% if pillar_php_version is iterable and pillar_php_version is not string %} + {% for version in pillar_php_version %} + {% set first_version = pillar_php_version[0]|string %} {% set ini = php.lookup.cli.ini|replace(first_version, version) %} php_cli_ini_{{ version }}: {{ php_ini(ini, php.cli.ini.opts, settings) }} diff --git a/php/fpm/config.sls b/php/fpm/config.sls index 5252bcf..38dc4f0 100644 --- a/php/fpm/config.sls +++ b/php/fpm/config.sls @@ -11,11 +11,11 @@ {% endif %} {% endfor %} -{% set pillar_php_ng_version = salt['pillar.get']('php:ng:version', '7.0') %} -{% if pillar_php_ng_version is iterable and pillar_php_ng_version is not string %} - {% for version in pillar_php_ng_version %} +{% set pillar_php_version = salt['pillar.get']('php:version', '7.0') %} +{% if pillar_php_version is iterable and pillar_php_version is not string %} + {% for version in pillar_php_version %} {% set conf_settings = odict(php.lookup.fpm.defaults) %} - {% set first_version = pillar_php_ng_version[0]|string %} + {% set first_version = pillar_php_version[0]|string %} {% set ini = php.lookup.fpm.ini|replace(first_version, version) %} {% set conf = php.lookup.fpm.conf|replace(first_version, version) %} {% set pools = php.lookup.fpm.pools|replace(first_version, version) %} diff --git a/php/fpm/init.sls b/php/fpm/init.sls index 777fda0..e7b56ce 100644 --- a/php/fpm/init.sls +++ b/php/fpm/init.sls @@ -5,13 +5,13 @@ include: - php.fpm.service - php.fpm.pools -{% set pillar_php_ng_version = salt['pillar.get']('php:ng:version', '7.0') %} +{% set pillar_php_version = salt['pillar.get']('php:version', '7.0') %} extend: php_fpm_service: service: - watch: - {% if pillar_php_ng_version is iterable and pillar_php_ng_version is not string %} - {% for version in pillar_php_ng_version %} + {% if pillar_php_version is iterable and pillar_php_version is not string %} + {% for version in pillar_php_version %} - file: php_fpm_ini_config_{{ version }} - file: php_fpm_conf_config_{{ version }} {% endfor %} @@ -21,8 +21,8 @@ extend: {% endif %} - require: - sls: php.fpm.config - {% if pillar_php_ng_version is iterable and pillar_php_ng_version is not string %} - {% for version in pillar_php_ng_version %} + {% if pillar_php_version is iterable and pillar_php_version is not string %} + {% for version in pillar_php_version %} php_fpm_ini_config_{{ version }}: file: - require: diff --git a/php/fpm/pools_config.sls b/php/fpm/pools_config.sls index 0fc9cb0..48360c1 100644 --- a/php/fpm/pools_config.sls +++ b/php/fpm/pools_config.sls @@ -18,10 +18,10 @@ {% endfor %} {% set state = 'php_fpm_pool_conf_' ~ loop.index0 %} -{% set pillar_php_ng_version = salt['pillar.get']('php:ng:version', '7.0') %} -{% if pillar_php_ng_version is iterable and pillar_php_ng_version is not string %} +{% set pillar_php_version = salt['pillar.get']('php:version', '7.0') %} +{% if pillar_php_version is iterable and pillar_php_version is not string %} {% set first_fpath = path_join(config.get('filename', pool), php.lookup.fpm.pools) %} - {% set first_version = pillar_php_ng_version[0]|string %} + {% set first_version = pillar_php_version[0]|string %} {% set fpath = first_fpath.replace(first_version, config.get('phpversion', '7.0')) %} {% else %} {% set fpath = path_join(config.get('filename', pool), php.lookup.fpm.pools) %} diff --git a/php/installed.jinja b/php/installed.jinja index 59d18d7..46f037f 100644 --- a/php/installed.jinja +++ b/php/installed.jinja @@ -9,16 +9,16 @@ {% set pkgs = [] %} {% set specials = [] %} -{% set pillar_php_ng_version = salt['pillar.get']('php:ng:version', '7.0') %} +{% set pillar_php_version = salt['pillar.get']('php:version', '7.0') %} {% if pkginfo is iterable and pkginfo is not string %} {% for pkg in pkginfo %} {% if pkg is mapping %} {% do specials.append(pkg) %} {% else %} {% do pkgs.append(pkg) %} - {% if pillar_php_ng_version is iterable and pillar_php_ng_version is not string %} - {% set first_version = pillar_php_ng_version[0]|string %} - {% for other_version in pillar_php_ng_version %} + {% if pillar_php_version is iterable and pillar_php_version is not string %} + {% set first_version = pillar_php_version[0]|string %} + {% for other_version in pillar_php_version %} {% set other_version_str = other_version|string %} {% do pkgs.append(pkg.replace(first_version, other_version_str)) %} {% endfor %} @@ -27,9 +27,9 @@ {% endfor %} {% else %} {% do pkgs.append(pkginfo) %} - {% if pillar_php_ng_version is iterable and pillar_php_ng_version is not string %} - {% set first_version = pillar_php_ng_version[0]|string %} - {% for other_version in pillar_php_ng_version %} + {% if pillar_php_version is iterable and pillar_php_version is not string %} + {% set first_version = pillar_php_version[0]|string %} + {% for other_version in pillar_php_version %} {% set other_version_str = other_version|string %} {% do pkgs.append(pkginfo.replace(first_version, other_version_str)) %} {% endfor %}