2014-11-11 18:34:06 +01:00
|
|
|
---
|
|
|
|
- name: Ensure configuration directories exist.
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
2015-04-14 20:29:26 +02:00
|
|
|
follow: true
|
2014-11-11 18:34:06 +01:00
|
|
|
with_items:
|
|
|
|
- "{{ php_conf_path }}"
|
|
|
|
- "{{ php_extension_conf_path }}"
|
|
|
|
|
|
|
|
- name: Place PHP configuration file in place.
|
|
|
|
template:
|
|
|
|
src: php.ini.j2
|
|
|
|
dest: "{{ php_conf_path }}/php.ini"
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
notify: restart webserver
|
|
|
|
when: php_use_managed_ini
|
|
|
|
|
|
|
|
- name: Place APC configuration file in place.
|
|
|
|
template:
|
|
|
|
src: apc.ini.j2
|
|
|
|
dest: "{{ php_extension_conf_path }}/{{ php_apc_conf_filename }}"
|
|
|
|
owner: root
|
|
|
|
group: root
|
2015-02-26 21:17:51 +01:00
|
|
|
force: yes
|
2014-11-11 18:34:06 +01:00
|
|
|
mode: 0644
|
|
|
|
when: php_enable_apc
|
|
|
|
notify: restart webserver
|
|
|
|
|
2015-04-30 22:54:15 +02:00
|
|
|
- name: Place OpCache configuration file in place.
|
|
|
|
template:
|
|
|
|
src: opcache.ini.j2
|
|
|
|
dest: "{{ php_extension_conf_path }}/{{ php_opcache_conf_filename }}"
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
force: yes
|
|
|
|
mode: 0644
|
|
|
|
when: php_opcache_enable
|
|
|
|
notify: restart webserver
|
|
|
|
|
2014-11-11 18:34:06 +01:00
|
|
|
- name: Ensure php-fpm is started and enabled at boot (if configured).
|
|
|
|
service:
|
2014-11-17 23:46:38 +01:00
|
|
|
name: "{{ php_fpm_daemon }}"
|
2014-11-11 18:34:06 +01:00
|
|
|
state: started
|
|
|
|
enabled: yes
|
|
|
|
when: php_enable_php_fpm
|