Use |bool filter on opcache variable to avoid deprecation warning

This commit is contained in:
Jeff Sheltren 2019-10-15 11:14:26 -07:00
parent 903e595c4b
commit 1f4b20ba7d
2 changed files with 3 additions and 3 deletions

View File

@ -25,7 +25,7 @@
force: true
mode: 0644
with_items: "{{ php_extension_conf_paths }}"
when: php_opcache_enable
when: php_opcache_enable|bool
notify: restart webserver
- name: Remove OpCache config file if OpCache is disabled.
@ -33,5 +33,5 @@
path: "{{ item }}/{{ php_opcache_conf_filename }}"
state: absent
with_items: "{{ php_extension_conf_paths }}"
when: not php_opcache_enable
when: not php_opcache_enable|bool
notify: restart webserver

View File

@ -23,5 +23,5 @@
path: "{{ item }}/{{ php_opcache_conf_filename }}"
state: absent
with_items: "{{ php_extension_conf_paths }}"
when: php_opcache_enable and php_package_install.changed
when: php_opcache_enable|bool and php_package_install.changed
notify: restart webserver