--- - name: Install RH Software Collections yum: name="{{ item }}" state=present with_items: - centos-release-scl - name: Install PHP yum: name="{{ item }}" state=present with_items: - pcre-devel - rh-php72 - rh-php72-php - rh-php72-php-devel - rh-php72-php-gd - rh-php72-php-pear - rh-php72-php-ldap - rh-php72-php-mbstring - rh-php72-php-opcache - rh-php72-php-pecl-apcu - rh-php72-php-mysqlnd - rh-php72-php-process - rh-php72-php-cli - name: Copy php.ini configuration template: src={{ php_ini }} dest=/etc/opt/rh/rh-php72/php.ini notify: reload apache - name: Install APC shell: yes '' | pecl install apc; echo '' args: creates: /usr/lib64/php/modules/apc.so - name: Enable Software Collection for php template: src: "{{ php_enable }}" dest: /etc/profile.d/php.sh - name: Enable php path for all process lineinfile: dest: /etc/environment line: 'PATH=/opt/rh/rh-php72/root/usr/bin:/opt/rh/rh-php72/root/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin' state: present # Mailparse #- name: Symlink for phpize # file: # path: /usr/bin/phpize5 # src: /usr/bin/phpize # state: link # #- name: Symlink for php-config # file: # path: /usr/bin/php-config5 # src: /usr/bin/php-config # state: link # #- name: Install mailparse php module # shell: pecl install -n mailparse-2.1.6 # args: # creates: /usr/lib64/php/modules/mailparse.so # #- name: Load mailparse # lineinfile: # dest: /etc/php.d/30-mailparse.ini # line: 'extension=mailparse.so' # create: yes # state: present #