94 lines
2.2 KiB
YAML
94 lines
2.2 KiB
YAML
---
|
|
- name: install gpg key
|
|
rpm_key:
|
|
state: present
|
|
key: https://rpms.remirepo.net/RPM-GPG-KEY-remi2018
|
|
environment:
|
|
http_proxy: http://proxy.ville-geneve.ch:8080
|
|
https_proxy: http://proxy.ville-geneve.ch:8080
|
|
become: true
|
|
|
|
- name: install Remi repo
|
|
yum:
|
|
name: https://rpms.remirepo.net/enterprise/remi-release-8.rpm
|
|
state: present
|
|
environment:
|
|
http_proxy: http://proxy.ville-geneve.ch:8080
|
|
https_proxy: http://proxy.ville-geneve.ch:8080
|
|
become: true
|
|
|
|
- name: reset module php
|
|
command: dnf module reset php -y
|
|
changed_when: true
|
|
become: true
|
|
|
|
- name: install module php
|
|
command: dnf module install php:remi-7.4 -y
|
|
changed_when: true
|
|
become: true
|
|
|
|
- name: install php74-fpm and modules
|
|
yum:
|
|
name:
|
|
- php-fpm
|
|
- php-cli
|
|
- php-gd
|
|
- php-mbstring
|
|
- php-ldap
|
|
- php-bcmath
|
|
- php-xml
|
|
- php-pdo
|
|
- php-intl
|
|
- php-mysqlnd
|
|
- php-pear
|
|
- php-gmp
|
|
- php-zip
|
|
state: present
|
|
become: true
|
|
notify: restart_httpd
|
|
|
|
- name: copy php.ini
|
|
copy:
|
|
src: php74/php.ini
|
|
dest: /etc/php.ini
|
|
become: true
|
|
|
|
- name: copy phpfpm-php.conf
|
|
copy:
|
|
src: php74/phpfpm-php.conf
|
|
dest: /etc/httpd/conf.d/phpfpm-php.conf
|
|
become: true
|
|
notify: restart_httpd
|
|
|
|
- name: replace listen ip address an port
|
|
replace:
|
|
path: /etc/php-fpm.d/www.conf
|
|
regexp: "^listen = /run/php-fpm/www.sock"
|
|
replace: "listen = 127.0.0.1:9000"
|
|
become: true
|
|
notify: restart_php-fpm
|
|
|
|
- name: disable mpm_prefork
|
|
replace:
|
|
path: /etc/httpd/conf.modules.d/00-mpm.conf
|
|
regexp: '^LoadModule mpm_prefork_module( *.*)'
|
|
replace: '#LoadModule mpm_prefork_module\1'
|
|
notify: restart_httpd
|
|
become: true
|
|
|
|
- name: enable mpm_event
|
|
replace:
|
|
path: /etc/httpd/conf.modules.d/00-mpm.conf
|
|
regexp: '^#LoadModule mpm_event_module( *.*)'
|
|
replace: 'LoadModule mpm_event_module\1'
|
|
become: true
|
|
notify: restart_httpd
|
|
|
|
- name: create folder for log php-fpm
|
|
file:
|
|
path: /var/log/php-fpm/
|
|
state: directory
|
|
become: true
|
|
|
|
|