47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
---
|
|
|
|
- name: Install required PHP packages
|
|
ansible.builtin.apt:
|
|
pkg:
|
|
- php{{ php_version }}
|
|
- php{{ php_version }}-bcmath
|
|
- php{{ php_version }}-bz2
|
|
- php{{ php_version }}-cgi
|
|
- php{{ php_version }}-cli
|
|
- php{{ php_version }}-common
|
|
- php{{ php_version }}-curl
|
|
- php{{ php_version }}-fpm
|
|
- php{{ php_version }}-gd
|
|
- php{{ php_version }}-ldap
|
|
- php{{ php_version }}-mbstring
|
|
- php{{ php_version }}-mysql
|
|
- php{{ php_version }}-opcache
|
|
- php{{ php_version }}-readline
|
|
- php{{ php_version }}-xml
|
|
- php{{ php_version }}-zip
|
|
state: present
|
|
|
|
- name: Install libapache2-mod-php
|
|
ansible.builtin.apt:
|
|
pkg:
|
|
- libapache2-mod-php{{ php_version }}
|
|
state: present
|
|
|
|
- name: Copy cli php.ini file
|
|
ansible.builtin.template:
|
|
src: "files/php-cli-ini.j2"
|
|
dest: "/etc/php/{{ php_version }}/cli/php.ini"
|
|
owner: root
|
|
group: root
|
|
mode: "0644"
|
|
notify: Reload apache2
|
|
|
|
- name: Setup PHP info page for debugging
|
|
ansible.builtin.template:
|
|
src: "files/info.php.j2"
|
|
dest: "{{ document_root }}/{{ package }}/info.php"
|
|
owner: root
|
|
group: root
|
|
mode: "0644"
|
|
notify: Reload apache2
|