---
- hosts: 10.0.0.171
vars:
redisver: phpredis-5.3.4
redissrc: phpredis-5.3.4.tar.gz
phpdir: /data/php
tasks:
- name: autoconf
yum: name=autoconf
- name: get php-redis code
unarchive: remote_src=no src={{redissrc}} dest=/usr/local/src
register: var1
until: var1 is succeeded
- name: configure
shell: |
chdir=/usr/local/src/{{redisver}}
{{phpdir}}/bin/phpize
./configure --with-php-config={{phpdir}}/bin/php-config
make
make install
echo 'extension=redis.so' >> /etc/php.ini
- name: restart php-fpm
service: name=php-fpm state=restarted enabled=yes