Skip to content

Commit a8c3603

Browse files
authored
Merge pull request #194 from n-rodriguez/wip/fix_fpm_pools
fix(pillar): fix pillar.get still looking under 'ng' namespace
2 parents 2a353df + 378b5b1 commit a8c3603

File tree

5 files changed

+23
-23
lines changed

5 files changed

+23
-23
lines changed

php/cli/ini.sls

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
{% endif %}
1212
{% endfor %}
1313
14-
{% set pillar_php_ng_version = salt['pillar.get']('php:ng:version', '7.0') %}
15-
{% if pillar_php_ng_version is iterable and pillar_php_ng_version is not string %}
16-
{% for version in pillar_php_ng_version %}
17-
{% set first_version = pillar_php_ng_version[0]|string %}
14+
{% set pillar_php_version = salt['pillar.get']('php:version', '7.0') %}
15+
{% if pillar_php_version is iterable and pillar_php_version is not string %}
16+
{% for version in pillar_php_version %}
17+
{% set first_version = pillar_php_version[0]|string %}
1818
{% set ini = php.lookup.cli.ini|replace(first_version, version) %}
1919
php_cli_ini_{{ version }}:
2020
{{ php_ini(ini, php.cli.ini.opts, settings) }}

php/fpm/config.sls

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
{% endif %}
1212
{% endfor %}
1313
14-
{% set pillar_php_ng_version = salt['pillar.get']('php:ng:version', '7.0') %}
15-
{% if pillar_php_ng_version is iterable and pillar_php_ng_version is not string %}
16-
{% for version in pillar_php_ng_version %}
14+
{% set pillar_php_version = salt['pillar.get']('php:version', '7.0') %}
15+
{% if pillar_php_version is iterable and pillar_php_version is not string %}
16+
{% for version in pillar_php_version %}
1717
{% set conf_settings = odict(php.lookup.fpm.defaults) %}
18-
{% set first_version = pillar_php_ng_version[0]|string %}
18+
{% set first_version = pillar_php_version[0]|string %}
1919
{% set ini = php.lookup.fpm.ini|replace(first_version, version) %}
2020
{% set conf = php.lookup.fpm.conf|replace(first_version, version) %}
2121
{% set pools = php.lookup.fpm.pools|replace(first_version, version) %}

php/fpm/init.sls

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ include:
55
- php.fpm.service
66
- php.fpm.pools
77

8-
{% set pillar_php_ng_version = salt['pillar.get']('php:ng:version', '7.0') %}
8+
{% set pillar_php_version = salt['pillar.get']('php:version', '7.0') %}
99
extend:
1010
php_fpm_service:
1111
service:
1212
- watch:
13-
{% if pillar_php_ng_version is iterable and pillar_php_ng_version is not string %}
14-
{% for version in pillar_php_ng_version %}
13+
{% if pillar_php_version is iterable and pillar_php_version is not string %}
14+
{% for version in pillar_php_version %}
1515
- file: php_fpm_ini_config_{{ version }}
1616
- file: php_fpm_conf_config_{{ version }}
1717
{% endfor %}
@@ -21,8 +21,8 @@ extend:
2121
{% endif %}
2222
- require:
2323
- sls: php.fpm.config
24-
{% if pillar_php_ng_version is iterable and pillar_php_ng_version is not string %}
25-
{% for version in pillar_php_ng_version %}
24+
{% if pillar_php_version is iterable and pillar_php_version is not string %}
25+
{% for version in pillar_php_version %}
2626
php_fpm_ini_config_{{ version }}:
2727
file:
2828
- require:

php/fpm/pools_config.sls

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
{% endfor %}
1919
{% set state = 'php_fpm_pool_conf_' ~ loop.index0 %}
2020
21-
{% set pillar_php_ng_version = salt['pillar.get']('php:ng:version', '7.0') %}
22-
{% if pillar_php_ng_version is iterable and pillar_php_ng_version is not string %}
21+
{% set pillar_php_version = salt['pillar.get']('php:version', '7.0') %}
22+
{% if pillar_php_version is iterable and pillar_php_version is not string %}
2323
{% set first_fpath = path_join(config.get('filename', pool), php.lookup.fpm.pools) %}
24-
{% set first_version = pillar_php_ng_version[0]|string %}
24+
{% set first_version = pillar_php_version[0]|string %}
2525
{% set fpath = first_fpath.replace(first_version, config.get('phpversion', '7.0')) %}
2626
{% else %}
2727
{% set fpath = path_join(config.get('filename', pool), php.lookup.fpm.pools) %}

php/installed.jinja

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99
{% set pkgs = [] %}
1010
{% set specials = [] %}
1111

12-
{% set pillar_php_ng_version = salt['pillar.get']('php:ng:version', '7.0') %}
12+
{% set pillar_php_version = salt['pillar.get']('php:version', '7.0') %}
1313
{% if pkginfo is iterable and pkginfo is not string %}
1414
{% for pkg in pkginfo %}
1515
{% if pkg is mapping %}
1616
{% do specials.append(pkg) %}
1717
{% else %}
1818
{% do pkgs.append(pkg) %}
19-
{% if pillar_php_ng_version is iterable and pillar_php_ng_version is not string %}
20-
{% set first_version = pillar_php_ng_version[0]|string %}
21-
{% for other_version in pillar_php_ng_version %}
19+
{% if pillar_php_version is iterable and pillar_php_version is not string %}
20+
{% set first_version = pillar_php_version[0]|string %}
21+
{% for other_version in pillar_php_version %}
2222
{% set other_version_str = other_version|string %}
2323
{% do pkgs.append(pkg.replace(first_version, other_version_str)) %}
2424
{% endfor %}
@@ -27,9 +27,9 @@
2727
{% endfor %}
2828
{% else %}
2929
{% do pkgs.append(pkginfo) %}
30-
{% if pillar_php_ng_version is iterable and pillar_php_ng_version is not string %}
31-
{% set first_version = pillar_php_ng_version[0]|string %}
32-
{% for other_version in pillar_php_ng_version %}
30+
{% if pillar_php_version is iterable and pillar_php_version is not string %}
31+
{% set first_version = pillar_php_version[0]|string %}
32+
{% for other_version in pillar_php_version %}
3333
{% set other_version_str = other_version|string %}
3434
{% do pkgs.append(pkginfo.replace(first_version, other_version_str)) %}
3535
{% endfor %}

0 commit comments

Comments
 (0)