2014-03-01 03:39:35 +01:00
|
|
|
---
|
2014-11-11 18:34:06 +01:00
|
|
|
# Variable setup.
|
2020-07-25 00:17:50 +02:00
|
|
|
- name: Set the default PHP version for Debian-based OSes.
|
|
|
|
set_fact:
|
|
|
|
php_default_version_debian: "{{ __php_default_version_debian }}"
|
2020-08-25 00:13:21 +02:00
|
|
|
when: php_default_version_debian is not defined and ansible_os_family == 'Debian'
|
2020-07-25 00:17:50 +02:00
|
|
|
|
2014-04-23 18:26:37 +02:00
|
|
|
- name: Include OS-specific variables.
|
|
|
|
include_vars: "{{ ansible_os_family }}.yml"
|
|
|
|
|
2022-02-02 20:21:11 +01:00
|
|
|
- name: Include distribution and version-specific vars.
|
|
|
|
include_vars: "{{ item }}"
|
|
|
|
with_first_found:
|
|
|
|
- files:
|
|
|
|
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
|
|
|
|
skip: true
|
|
|
|
|
2014-06-07 20:01:14 +02:00
|
|
|
- name: Define php_packages.
|
2014-09-21 06:15:45 +02:00
|
|
|
set_fact:
|
|
|
|
php_packages: "{{ __php_packages | list }}"
|
2014-06-07 20:01:14 +02:00
|
|
|
when: php_packages is not defined
|
|
|
|
|
2014-11-10 21:38:41 +01:00
|
|
|
- name: Define php_webserver_daemon.
|
|
|
|
set_fact:
|
2014-11-11 17:50:44 +01:00
|
|
|
php_webserver_daemon: "{{ __php_webserver_daemon }}"
|
2014-11-10 21:38:41 +01:00
|
|
|
when: php_webserver_daemon is not defined
|
|
|
|
|
2016-03-04 03:24:26 +01:00
|
|
|
- name: Define php_conf_paths.
|
2015-02-26 21:17:51 +01:00
|
|
|
set_fact:
|
2016-03-04 03:24:26 +01:00
|
|
|
php_conf_paths: "{{ __php_conf_paths }}"
|
|
|
|
when: php_conf_paths is not defined
|
2015-02-26 21:17:51 +01:00
|
|
|
|
2016-03-04 03:24:26 +01:00
|
|
|
- name: Define php_extension_conf_paths.
|
2015-04-14 19:58:38 +02:00
|
|
|
set_fact:
|
2016-03-04 03:24:26 +01:00
|
|
|
php_extension_conf_paths: "{{ __php_extension_conf_paths }}"
|
|
|
|
when: php_extension_conf_paths is not defined
|
2015-04-14 19:58:38 +02:00
|
|
|
|
2015-08-20 08:34:29 +02:00
|
|
|
- name: Define php_apc_conf_filename.
|
|
|
|
set_fact:
|
|
|
|
php_apc_conf_filename: "{{ __php_apc_conf_filename }}"
|
|
|
|
when: php_apc_conf_filename is not defined
|
|
|
|
|
2016-05-19 18:00:45 +02:00
|
|
|
- name: Define php_opcache_conf_filename (Ubuntu 16.04).
|
|
|
|
set_fact:
|
|
|
|
php_opcache_conf_filename: "10-opcache.ini"
|
|
|
|
when: php_opcache_conf_filename is not defined and ansible_distribution_version == "16.04"
|
|
|
|
|
2015-08-20 08:34:29 +02:00
|
|
|
- name: Define php_opcache_conf_filename.
|
|
|
|
set_fact:
|
|
|
|
php_opcache_conf_filename: "{{ __php_opcache_conf_filename }}"
|
|
|
|
when: php_opcache_conf_filename is not defined
|
|
|
|
|
2016-03-04 03:24:26 +01:00
|
|
|
- name: Define php_fpm_conf_path.
|
|
|
|
set_fact:
|
|
|
|
php_fpm_conf_path: "{{ __php_fpm_conf_path }}"
|
|
|
|
when: php_fpm_conf_path is not defined
|
|
|
|
|
2014-11-11 18:34:06 +01:00
|
|
|
# Setup/install tasks.
|
2018-04-26 19:34:04 +02:00
|
|
|
- include_tasks: setup-RedHat.yml
|
2018-10-25 18:09:47 +02:00
|
|
|
when:
|
|
|
|
- not php_install_from_source
|
|
|
|
- ansible_os_family == 'RedHat'
|
2014-04-23 18:26:37 +02:00
|
|
|
|
2018-04-26 19:34:04 +02:00
|
|
|
- include_tasks: setup-Debian.yml
|
2018-10-25 18:09:47 +02:00
|
|
|
when:
|
|
|
|
- not php_install_from_source
|
|
|
|
- ansible_os_family == 'Debian'
|
2015-06-01 03:51:50 +02:00
|
|
|
|
|
|
|
# Install PHP from source when php_install_from_source is true.
|
2018-04-26 19:34:04 +02:00
|
|
|
- include_tasks: install-from-source.yml
|
2018-10-25 18:09:47 +02:00
|
|
|
when: php_install_from_source
|
2014-03-01 03:39:35 +01:00
|
|
|
|
2014-11-11 18:34:06 +01:00
|
|
|
# Configure PHP.
|
2018-04-26 19:34:04 +02:00
|
|
|
- include_tasks: configure.yml
|
|
|
|
- include_tasks: configure-apcu.yml
|
|
|
|
- include_tasks: configure-opcache.yml
|
|
|
|
- include_tasks: configure-fpm.yml
|