ansible-role-php/tasks/setup-Debian.yml

28 lines
851 B
YAML
Raw Normal View History

---
- name: Update apt cache.
apt: update_cache=yes cache_valid_time=86400
2014-11-20 21:22:46 +01:00
- name: Ensure PHP packages are installed.
apt:
name: "{{ item }}"
2016-05-02 14:57:32 +02:00
state: "{{ php_packages_state }}"
2016-02-29 06:39:03 +01:00
with_items: "{{ php_packages }}"
register: php_package_install
notify: restart webserver
- name: Delete APCu configuration file if this role will provide one.
file:
path: "{{ item }}/{{ php_apc_conf_filename }}"
state: absent
with_items: "{{ php_extension_conf_paths }}"
when: php_enable_apc and php_package_install.changed
notify: restart webserver
- name: Delete OpCache configuration file if this role will provide one.
file:
path: "{{ item }}/{{ php_opcache_conf_filename }}"
state: absent
with_items: "{{ php_extension_conf_paths }}"
when: php_opcache_enable and php_package_install.changed
notify: restart webserver