forked from evolix/ansible-roles
php: look for PHP 7.3 with buster
This commit is contained in:
parent
bb6191d104
commit
a4236a0708
|
@ -9,4 +9,7 @@
|
||||||
when: ansible_lsb.codename == "jessie"
|
when: ansible_lsb.codename == "jessie"
|
||||||
|
|
||||||
- include: main_stretch.yml
|
- include: main_stretch.yml
|
||||||
|
when: ansible_lsb.codename == "stretch"
|
||||||
|
|
||||||
|
- include: main_buster.yml
|
||||||
when: ansible_distribution_major_version | version_compare('9', '>=')
|
when: ansible_distribution_major_version | version_compare('9', '>=')
|
||||||
|
|
95
php/tasks/main_buster.yml
Normal file
95
php/tasks/main_buster.yml
Normal file
|
@ -0,0 +1,95 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
- name: "Set variables (Debian 10 or later)"
|
||||||
|
set_fact:
|
||||||
|
php_cli_defaults_ini_file: /etc/php/7.3/cli/conf.d/z-evolinux-defaults.ini
|
||||||
|
php_cli_custom_ini_file: /etc/php/7.3/cli/conf.d/zzz-evolinux-custom.ini
|
||||||
|
php_apache_defaults_ini_file: /etc/php/7.3/apache2/conf.d/z-evolinux-defaults.ini
|
||||||
|
php_apache_custom_ini_file: /etc/php/7.3/apache2/conf.d/zzz-evolinux-custom.ini
|
||||||
|
php_fpm_defaults_ini_file: /etc/php/7.3/fpm/conf.d/z-evolinux-defaults.ini
|
||||||
|
php_fpm_custom_ini_file: /etc/php/7.3/fpm/conf.d/zzz-evolinux-custom.ini
|
||||||
|
php_fpm_defaults_conf_file: /etc/php/7.3/fpm/pool.d/z-evolinux-defaults.conf
|
||||||
|
php_fpm_custom_conf_file: /etc/php/7.3/fpm/pool.d/zzz-evolinux-custom.conf
|
||||||
|
php_fpm_service_name: php7.3-fpm
|
||||||
|
|
||||||
|
# Packages
|
||||||
|
|
||||||
|
- name: "Set package list (Debian 9 or later)"
|
||||||
|
set_fact:
|
||||||
|
php_stretch_packages:
|
||||||
|
- php-cli
|
||||||
|
- php-gd
|
||||||
|
- php-intl
|
||||||
|
- php-imap
|
||||||
|
- php-ldap
|
||||||
|
- php-mysql
|
||||||
|
# php-mcrypt is no longer packaged for PHP 7.2
|
||||||
|
- php-pgsql
|
||||||
|
- php-gettext
|
||||||
|
- php-curl
|
||||||
|
- php-ssh2
|
||||||
|
- php-zip
|
||||||
|
- composer
|
||||||
|
- libphp-phpmailer
|
||||||
|
|
||||||
|
- include: sury_pre.yml
|
||||||
|
when: php_sury_enable
|
||||||
|
|
||||||
|
- name: "Install PHP packages (Debian 9 or later)"
|
||||||
|
apt:
|
||||||
|
name: '{{ item }}'
|
||||||
|
state: present
|
||||||
|
with_items: "{{ php_stretch_packages }}"
|
||||||
|
|
||||||
|
- name: "Install mod_php packages (Debian 9 or later)"
|
||||||
|
apt:
|
||||||
|
name: '{{ item }}'
|
||||||
|
state: present
|
||||||
|
with_items:
|
||||||
|
- libapache2-mod-php
|
||||||
|
- php
|
||||||
|
when: php_apache_enable
|
||||||
|
|
||||||
|
- name: "Install PHP FPM packages (Debian 9 or later)"
|
||||||
|
apt:
|
||||||
|
name: '{{ item }}'
|
||||||
|
state: present
|
||||||
|
with_items:
|
||||||
|
- php-fpm
|
||||||
|
- php
|
||||||
|
when: php_fpm_enable
|
||||||
|
|
||||||
|
# Configuration
|
||||||
|
|
||||||
|
- name: Enforce permissions on PHP directory
|
||||||
|
file:
|
||||||
|
dest: "{{ item }}"
|
||||||
|
mode: "0755"
|
||||||
|
with_items:
|
||||||
|
- /etc/php
|
||||||
|
- /etc/php/7.3
|
||||||
|
|
||||||
|
- include: config_cli.yml
|
||||||
|
- name: Enforce permissions on PHP cli directory
|
||||||
|
file:
|
||||||
|
dest: /etc/php/7.3/cli
|
||||||
|
mode: "0755"
|
||||||
|
|
||||||
|
- include: config_fpm.yml
|
||||||
|
when: php_fpm_enable
|
||||||
|
- name: Enforce permissions on PHP fpm directory
|
||||||
|
file:
|
||||||
|
dest: /etc/php/7.3/fpm
|
||||||
|
mode: "0755"
|
||||||
|
when: php_fpm_enable
|
||||||
|
|
||||||
|
- include: config_apache.yml
|
||||||
|
when: php_apache_enable
|
||||||
|
- name: Enforce permissions on PHP apache2 directory
|
||||||
|
file:
|
||||||
|
dest: /etc/php/7.3/apache2
|
||||||
|
mode: "0755"
|
||||||
|
when: php_apache_enable
|
||||||
|
|
||||||
|
- include: sury_post.yml
|
||||||
|
when: php_sury_enable
|
Loading…
Reference in a new issue