Merge pull request #280 from jeffsheltren/opcache-bool-fix

Use |bool filter on opcache variable to avoid deprecation warning
This commit is contained in:
Jeff Geerling 2019-11-06 12:42:17 -06:00 committed by GitHub
commit 47acf30a1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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