File tree Expand file tree Collapse file tree
src/roles/apache-php/tasks Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8484 path : /usr/lib64/php/modules/memcached.so
8585 register : memcached_so
8686
87- - name : Reinstall memcached if .so file missing
87+ - name : Check if memcached extension loads without errors
88+ shell : php -d display_errors=on -d display_startup_errors=on -m 2>&1 | grep -q "^memcached$"
89+ register : memcached_loads
90+ failed_when : false
91+ changed_when : false
92+
93+ - name : Reinstall memcached if missing or incompatible
8894 block :
95+ - name : Remove old memcached.so before reinstalling
96+ file :
97+ path : /usr/lib64/php/modules/memcached.so
98+ state : absent
99+
89100 - name : Uninstall existing memcached PECL package
90101 shell : pecl uninstall memcached
91102 ignore_errors : true
92103
93- # --configureoptions parameter is not supported in all versions of pecl.
104+ # --configureoptions parameter is not supported in all versions of pecl.
94105 - name : Install memcached PECL packages
95106 shell : >
96107 printf 'no\nno\nno\nno\nno\nno\nno\nyes\nyes\n' |
97108 pecl install memcached
98- when : not memcached_so.stat.exists
109+ when : not memcached_so.stat.exists or memcached_loads.rc != 0
99110
100111- name : Trigger restart if memcached was reinstalled
101112 debug :
102113 msg : " Memcached was reinstalled"
103- changed_when : not memcached_so.stat.exists
114+ changed_when : not memcached_so.stat.exists or memcached_loads.rc != 0
104115 notify :
105116 - restart apache
106117 - restart php-fpm
You can’t perform that action at this time.
0 commit comments