2014-11-11 18:34:06 +01:00
|
|
|
---
|
2015-02-26 21:22:10 +01:00
|
|
|
- name: Update apt cache.
|
|
|
|
apt: update_cache=yes cache_valid_time=86400
|
2014-11-20 21:22:46 +01:00
|
|
|
|
2014-11-11 18:34:06 +01:00
|
|
|
- name: Ensure PHP packages are installed.
|
|
|
|
apt:
|
2018-09-07 22:41:55 +02:00
|
|
|
name: "{{ php_packages }}"
|
2016-05-02 14:57:32 +02:00
|
|
|
state: "{{ php_packages_state }}"
|
2016-10-12 22:41:28 +02:00
|
|
|
install_recommends: "{{ php_install_recommends }}"
|
2016-02-20 23:52:15 +01:00
|
|
|
register: php_package_install
|
|
|
|
notify: restart webserver
|
|
|
|
|
2016-05-12 05:27:02 +02:00
|
|
|
- name: Delete APCu configuration file if this role will provide one.
|
2016-02-20 23:52:15 +01:00
|
|
|
file:
|
2016-03-04 03:24:26 +01:00
|
|
|
path: "{{ item }}/{{ php_apc_conf_filename }}"
|
2016-02-20 23:52:15 +01:00
|
|
|
state: absent
|
2016-03-04 03:24:26 +01:00
|
|
|
with_items: "{{ php_extension_conf_paths }}"
|
2016-02-20 23:52:15 +01:00
|
|
|
when: php_enable_apc and php_package_install.changed
|
|
|
|
notify: restart webserver
|
|
|
|
|
|
|
|
- name: Delete OpCache configuration file if this role will provide one.
|
|
|
|
file:
|
2016-03-04 03:24:26 +01:00
|
|
|
path: "{{ item }}/{{ php_opcache_conf_filename }}"
|
2016-02-20 23:52:15 +01:00
|
|
|
state: absent
|
2016-03-04 03:24:26 +01:00
|
|
|
with_items: "{{ php_extension_conf_paths }}"
|
2019-11-06 19:43:07 +01:00
|
|
|
when: php_opcache_enable | bool and php_package_install.changed
|
2014-11-11 18:34:06 +01:00
|
|
|
notify: restart webserver
|