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
---
- name: "[OpenRC] Enable and start service: php{{ services.php_fpm.version | default(7) }}-fpm (to deploy config changes)"
service:
name: php{{ services.php_fpm.version | default(7) }}-fpm
enabled: yes
state: started
when:
- ansible_service_mgr == "openrc"
- name: "[systemd] Enable and start service: php-fpm7 (to deploy config changes)"
systemd:
name: php-fpm7
enabled: yes
state: started
when:
- ansible_service_mgr == "systemd"
- services.php_fpm.version is not defined or services.php_fpm.version == 7
- name: "[systemd] Enable and start service: php-fpm (to deploy config changes)"
systemd:
name: php-fpm
enabled: yes
state: started
when:
- ansible_service_mgr == "systemd"
- services.php_fpm.version == 8