Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (33 sloc) 813 Bytes
---
- name: Add PHP 7.3 PPA
apt_repository:
repo: "ppa:ondrej/php"
update_cache: yes
- name: Install PHP 7.3
apt:
name: "{{ item.key }}"
state: "{{ item.value }}"
cache_valid_time: "{{ apt_cache_valid_time }}"
with_dict: "{{ php_extensions }}"
- name: Start php7.3-fpm service
service:
name: php7.3-fpm
state: started
enabled: true
- name: Check for existing php7.2-fpm service
stat:
path: /etc/init.d/php7.2-fpm
register: php72_status
- name: Stop php7.2-fpm service if it exists
service:
name: php7.2-fpm
state: stopped
enabled: false
register: service_stopped
when: php72_status.stat.exists
notify: reload php-fpm
- name: PHP configuration file
template:
src: php.ini.j2
dest: /etc/php/7.3/fpm/php.ini
notify: reload php-fpm