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:
|
|
|
|
name: "{{ item }}"
|
|
|
|
state: installed
|
2016-02-29 06:39:03 +01:00
|
|
|
with_items: "{{ php_packages }}"
|
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 }}"
|
2016-02-20 23:52:15 +01:00
|
|
|
when: php_opcache_enable and php_package_install.changed
|
2014-11-11 18:34:06 +01:00
|
|
|
notify: restart webserver
|