1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
- name: "[Alpine] Check php{{ services.php_fpm.version | default(7) }}-fpm config for errors"
shell: php{{ services.php_fpm.version | default(7) }}-fpm -t
changed_when: True
when:
- ansible_service_mgr == "openrc"
listen: "Restart php-fpm"
- name: "[Archlinux] Check php-fpm7 config for errors"
shell: php-fpm7 -t
changed_when: True
when:
- ansible_service_mgr == "systemd"
- services.php_fpm.version is not defined or services.php_fpm.version == 7
listen: "Restart php-fpm"
- name: "[Archlinux] Check php-fpm config for errors"
shell: php-fpm -t
changed_when: True
when:
- ansible_service_mgr == "systemd"
- services.php_fpm.version == 8
listen: "Restart php-fpm"
- name: "[OpenRC] Restart service: php{{ services.php_fpm.version | default(7) }}-fpm (to deploy config changes)"
service:
name: php{{ services.php_fpm.version | default(7) }}-fpm
state: restarted
when:
- ansible_service_mgr == "openrc"
listen: "Restart php-fpm"
- name: "[systemd] Restart service: php-fpm7 (to deploy config changes)"
systemd:
name: php-fpm7
state: restarted
when:
- ansible_service_mgr == "systemd"
- services.php_fpm.version is not defined or services.php_fpm.version == 7
listen: "Restart php-fpm"
- name: "[systemd] Restart service: php-fpm (to deploy config changes)"
systemd:
name: php-fpm
state: restarted
when:
- ansible_service_mgr == "systemd"
- services.php_fpm.version == 8
listen: "Restart php-fpm"