php.yml
[root@m01 /etc/ansible/roles/php/tasks]#cat main.yml
- name: mkdir /code/php71
file:
path: /code/php71/
state: directory
- name: copy php71.tar to hosts
unarchive:
src: php71.tar.gz
dest: /code/php71/
- name: yum local install rpm
yum:
name:
- /code/php71/autoconf-2.69-11.el7.noarch.rpm
- /code/php71/automake-1.13.4-3.el7.noarch.rpm
- /code/php71/libevent-2.0.21-4.el7.x86_64.rpm
- /code/php71/libjpeg-turbo-1.2.90-8.el7.x86_64.rpm
- /code/php71/libmcrypt-2.5.8-13.el7.x86_64.rpm
- /code/php71/libmemcached-1.0.16-5.el7.x86_64.rpm
- /code/php71/libtool-ltdl-2.4.2-22.el7_3.x86_64.rpm
- /code/php71/libX11-1.6.7-3.el7_9.x86_64.rpm
- /code/php71/libX11-common-1.6.7-3.el7_9.noarch.rpm
- /code/php71/libXau-1.0.8-2.1.el7.x86_64.rpm
- /code/php71/libxcb-1.13-1.el7.x86_64.rpm
- /code/php71/libXpm-3.5.12-1.el7.x86_64.rpm
- /code/php71/libxslt-1.1.28-6.el7.x86_64.rpm
- /code/php71/mod_php71w-7.1.33-1.w7.x86_64.rpm
- /code/php71/pcre-devel-8.32-17.el7.x86_64.rpm
- /code/php71/perl-Data-Dumper-2.145-3.el7.x86_64.rpm
- /code/php71/perl-Test-Harness-3.28-3.el7.noarch.rpm
- /code/php71/perl-Thread-Queue-3.02-2.el7.noarch.rpm
- /code/php71/php71w-cli-7.1.33-1.w7.x86_64.rpm
- /code/php71/php71w-common-7.1.33-1.w7.x86_64.rpm
- /code/php71/php71w-devel-7.1.33-1.w7.x86_64.rpm
- /code/php71/php71w-embedded-7.1.33-1.w7.x86_64.rpm
- /code/php71/php71w-fpm-7.1.33-1.w7.x86_64.rpm
- /code/php71/php71w-gd-7.1.33-1.w7.x86_64.rpm
- /code/php71/php71w-mbstring-7.1.33-1.w7.x86_64.rpm
- /code/php71/php71w-mcrypt-7.1.33-1.w7.x86_64.rpm
- /code/php71/php71w-mysqlnd-7.1.33-1.w7.x86_64.rpm
- /code/php71/php71w-opcache-7.1.33-1.w7.x86_64.rpm
- /code/php71/php71w-pdo-7.1.33-1.w7.x86_64.rpm
- /code/php71/php71w-pear-1.10.4-1.w7.noarch.rpm
- /code/php71/php71w-pecl-igbinary-2.0.5-1.w7.x86_64.rpm
- /code/php71/php71w-pecl-memcached-3.0.4-1.w7.x86_64.rpm
- /code/php71/php71w-pecl-mongodb-1.5.3-1.w7.x86_64.rpm
- /code/php71/php71w-pecl-redis-3.1.6-1.w7.x86_64.rpm
- /code/php71/php71w-process-7.1.33-1.w7.x86_64.rpm
- /code/php71/php71w-xml-7.1.33-1.w7.x86_64.rpm
state: present
- name: Start php Service
systemd:
name: php-fpm
state: started
enabled: yes
欢迎来撩 : 汇总all