File tree Expand file tree Collapse file tree 3 files changed +62
-13
lines changed Expand file tree Collapse file tree 3 files changed +62
-13
lines changed Original file line number Diff line number Diff line change @@ -6,39 +6,49 @@ include:
6
6
- php.fpm.pools
7
7
8
8
{% set pillar_php_version = salt[' pillar.get' ](' php:version' , ' 7.0' ) %}
9
+
9
10
extend:
10
- php_fpm_service:
11
+ {% if pillar_php_version is iterable and pillar_php_version is not string %}
12
+ {% for version in pillar_php_version %}
13
+
14
+ php_fpm_service_{{ version }} :
11
15
service:
12
16
- watch:
13
- {% if pillar_php_version is iterable and pillar_php_version is not string %}
14
- {% for version in pillar_php_version %}
15
17
- file: php_fpm_ini_config_ {{ version }}
16
18
- file: php_fpm_conf_config_ {{ version }}
17
- {% endfor %}
18
- {% else %}
19
- - file: php_fpm_ini_config
20
- - file: php_fpm_conf_config
21
- {% endif %}
22
19
- require:
23
20
- sls: php.fpm.config
24
- {% if pillar_php_version is iterable and pillar_php_version is not string %}
25
- {% for version in pillar_php_version %}
21
+
26
22
php_fpm_ini_config_{{ version }} :
27
23
file:
28
24
- require:
29
25
- pkg: php_install_fpm
26
+
30
27
php_fpm_conf_config_{{ version }} :
31
28
file:
32
29
- require:
33
30
- pkg: php_install_fpm
34
- {% endfor %}
35
- {% else %}
31
+
32
+ {% endfor %}
33
+
34
+ {% else %}
35
+
36
+ php_fpm_service:
37
+ service:
38
+ - watch:
39
+ - file: php_fpm_ini_config
40
+ - file: php_fpm_conf_config
41
+ - require:
42
+ - sls: php.fpm.config
43
+
36
44
php_fpm_ini_config:
37
45
file:
38
46
- require:
39
47
- pkg: php_install_fpm
48
+
40
49
php_fpm_conf_config:
41
50
file:
42
51
- require:
43
52
- pkg: php_install_fpm
44
- {% endif %}
53
+
54
+ {% endif %}
Original file line number Diff line number Diff line change @@ -8,12 +8,31 @@ include:
8
8
- php.fpm.service
9
9
- php.fpm.pools_config
10
10
11
+ {% set pillar_php_version = salt[' pillar.get' ](' php:version' , ' 7.0' ) % }
12
+
11
13
{% if pool_states % }
12
14
extend:
15
+
16
+ {% if pillar_php_version is iterable and pillar_php_version is not string % }
17
+ {% for version in pillar_php_version % }
18
+ php_fpm_service_{{ version }}:
19
+ service:
20
+ - watch:
21
+ {{ file_requisites(pool_states) }}
22
+ - require:
23
+ {{ file_requisites(pool_states) }}
24
+
25
+ {% endfor % }
26
+
27
+ {% else % }
28
+
13
29
php_fpm_service:
14
30
service:
15
31
- watch:
16
32
{{ file_requisites(pool_states) }}
17
33
- require:
18
34
{{ file_requisites(pool_states) }}
35
+
36
+ {% endif % }
37
+
19
38
{% endif % }
Original file line number Diff line number Diff line change 3
3
{% from " php/macro.jinja" import sls_block % }
4
4
5
5
{% set service_function = {True :' running' , False :' dead' }.get(php.fpm.service.enabled) % }
6
+ {% set pillar_php_version = salt[' pillar.get' ](' php:version' , ' 7.0' ) % }
6
7
7
8
include:
8
9
- php.fpm.install
9
10
11
+ {% if pillar_php_version is iterable and pillar_php_version is not string % }
12
+ {% for version in pillar_php_version % }
13
+
14
+ php_fpm_service_{{ version }}:
15
+ service.{{ service_function }}:
16
+ {{ sls_block(php.fpm.service.opts) }}
17
+ - name: {{ ' php' ~ version ~ ' -fpm' }}
18
+ - enable: {{ php.fpm.service.enabled }}
19
+ - require:
20
+ - sls: php.fpm.install
21
+ - watch:
22
+ - pkg: php_install_fpm
23
+
24
+ {% endfor % }
25
+
26
+ {% else % }
27
+
10
28
php_fpm_service:
11
29
service.{{ service_function }}:
12
30
{{ sls_block(php.fpm.service.opts) }}
@@ -16,3 +34,5 @@ php_fpm_service:
16
34
- sls: php.fpm.install
17
35
- watch:
18
36
- pkg: php_install_fpm
37
+
38
+ {% endif % }
You can’t perform that action at this time.
0 commit comments