From 9c420eec4fa57c8c8ce5f3732e634ac37110c077 Mon Sep 17 00:00:00 2001 From: Ludovic Poujol Date: Thu, 14 Nov 2019 17:25:59 +0100 Subject: [PATCH] packweb-apache: Automagically bootstrap the multiphp containers Introducing a new variable `packweb_multiphp_versions: []`. While set empty, packweb-apache will setup a regular packweb. When filled with PHP Versions, it will handle : - LXC Container setup and config (as a dependencie of lxc-php role) - Ensure evoadmin-web will set the rights versions in the config files by setting evoadmin_multiphp_versions Exemple value : `packweb_multiphp_versions: ['php70', 'php73']` That will call lxc-php to create both PHP 7.0 and PHP 7.3 containers. --- packweb-apache/defaults/main.yml | 2 ++ packweb-apache/meta/main.yml | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packweb-apache/defaults/main.yml b/packweb-apache/defaults/main.yml index fa7a701a..0c6b41f7 100644 --- a/packweb-apache/defaults/main.yml +++ b/packweb-apache/defaults/main.yml @@ -11,3 +11,5 @@ packweb_phpmyadmin_suffix: "" packweb_phpmyadmin_suffix_file: "/etc/evolinux/phpmyadmin_suffix" packweb_mysql_variant: "debian" + +packweb_multiphp_versions: [] diff --git a/packweb-apache/meta/main.yml b/packweb-apache/meta/main.yml index a276c53e..97cf077f 100644 --- a/packweb-apache/meta/main.yml +++ b/packweb-apache/meta/main.yml @@ -13,12 +13,18 @@ galaxy_info: versions: - jessie - stretch + - buster + +allow_duplicates: true dependencies: - { role: evolix/apache } - { role: evolix/php, php_apache_enable: True, when: packweb_apache_modphp } - { role: evolix/php, php_fpm_enable: True, when: packweb_apache_fpm } + - { role: evolix/lxc-php, lxc_php_version: php56, when: "'php56' in packweb_multiphp_versions" } + - { role: evolix/lxc-php, lxc_php_version: php70, when: "'php70' in packweb_multiphp_versions" } + - { role: evolix/lxc-php, lxc_php_version: php73, when: "'php73' in packweb_multiphp_versions" } - { role: evolix/squid, squid_localproxy_enable: True } - { role: evolix/mysql, when: packweb_mysql_variant == "debian" } - { role: evolix/mysql-oracle, when: packweb_mysql_variant == "oracle" } - - { role: evolix/webapps/evoadmin-web, evoadmin_enable_vhost: "{{ packweb_enable_evoadmin_vhost }}" } + - { role: evolix/webapps/evoadmin-web, evoadmin_enable_vhost: "{{ packweb_enable_evoadmin_vhost }}", evoadmin_multiphp_versions: "{{ packweb_multiphp_versions }}" }