--- - name: install gpg key rpm_key: state: present key: https://rpms.remirepo.net/enterprise/9/RPM-GPG-KEY-remi become: true - name: install Remi repo yum: name: https://rpms.remirepo.net/enterprise/remi-release-9.rpm state: present 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-8.2 -y changed_when: true become: true - name: install php8x-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: php82/php.ini dest: /etc/php.ini become: true - name: copy phpfpm-php.conf copy: src: php82/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 - name: copy phpinfo.php file copy: src: httpd/phpinfo.php dest: /var/www/html/intranet/phpinfo.php become: true