Page MenuHomeDevCentral

D3952.diff
No OneTemporary

D3952.diff

diff --git a/map.jinja b/map.jinja
--- a/map.jinja
+++ b/map.jinja
@@ -83,6 +83,53 @@
},
}, default="FreeBSD") %}
+{% set php_packages = salt["grains.filter_by"]({
+ "Debian" : {
+ "php82": {
+ "composer": "composer",
+ "php": "php8.2",
+ "prefix": "php8.2-",
+ },
+ "php83": {
+ "composer": "composer",
+ "php": "php8.3",
+ "prefix": "php8.3-",
+ },
+ "php84": {
+ "composer": "composer",
+ "php": "php8.4",
+ "prefix": "php8.4-",
+ },
+ "php85": {
+ "composer": "composer",
+ "php": "php8.5",
+ "prefix": "php8.5-",
+ },
+ },
+ "FreeBSD" : {
+ "php82": {
+ "composer": "php82-composer",
+ "php": "php82",
+ "prefix": "php82-",
+ },
+ "php83": {
+ "composer": "php83-composer",
+ "php": "php83",
+ "prefix": "php83-",
+ },
+ "php84": {
+ "composer": "php84-composer",
+ "php": "php84",
+ "prefix": "php84-",
+ },
+ "php85": {
+ "composer": "php85-composer",
+ "php": "php85",
+ "prefix": "php85-",
+ },
+ },
+}, default="Debian") %}
+
{% set packages_prefixes = salt["grains.filter_by"]({
"Debian": {
"pecl": "php-",
diff --git a/pillar/paas/alkane/hervil/main.sls b/pillar/paas/alkane/hervil/main.sls
--- a/pillar/paas/alkane/hervil/main.sls
+++ b/pillar/paas/alkane/hervil/main.sls
@@ -21,6 +21,9 @@
- admin.mail
- mail
+php:
+ version: php83
+
php_fpm_instances:
# PHP current version, generally installed as package/port
prod:
diff --git a/pillar/paas/alkane/web-001/main.sls b/pillar/paas/alkane/web-001/main.sls
--- a/pillar/paas/alkane/web-001/main.sls
+++ b/pillar/paas/alkane/web-001/main.sls
@@ -66,6 +66,9 @@
# Username must be unique and use max 31 characters.
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+php:
+ version: php82
+
php_fpm_instances:
# PHP current version, generally installed as package/port
prod:
diff --git a/roles/webserver-alkane/alkane/init.sls b/roles/webserver-alkane/alkane/init.sls
--- a/roles/webserver-alkane/alkane/init.sls
+++ b/roles/webserver-alkane/alkane/init.sls
@@ -5,7 +5,7 @@
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
-{% from "map.jinja" import dirs, packages, services with context %}
+{% from "map.jinja" import dirs, php_packages, services with context %}
{% set network = salt["node.resolve_network"]() %}
# -------------------------------------------------------------
@@ -35,7 +35,7 @@
recipes_dependencies:
pkg.installed:
- pkgs:
- - {{ packages.composer }}
+ - {{ php_packages[pillar["php"]["version"]]["composer"] }}
- jq
- yarn
diff --git a/roles/webserver-alkane/php/php.sls b/roles/webserver-alkane/php/php.sls
--- a/roles/webserver-alkane/php/php.sls
+++ b/roles/webserver-alkane/php/php.sls
@@ -5,9 +5,10 @@
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
-{% from "map.jinja" import dirs, packages, packages_prefixes with context %}
+{% from "map.jinja" import dirs, php_packages with context %}
{% set is_devserver = salt["node.has_role"]("devserver") %}
+{% set php_packages = php_packages[pillar["php"]["version"]] %}
# -------------------------------------------------------------
# Install PHP through packages
@@ -28,48 +29,48 @@
php_software:
pkg.installed:
- pkgs:
- - php83
+ - {{ php_packages.php }}
# PHP extensions
- - {{ packages_prefixes.php }}bcmath
- - {{ packages_prefixes.php }}curl
- - {{ packages_prefixes.php }}gd
- - {{ packages_prefixes.php }}intl
- - {{ packages_prefixes.php }}mbstring
- - {{ packages_prefixes.php }}soap
- - {{ packages_prefixes.php }}xml
- - {{ packages_prefixes.php }}xsl
+ - {{ php_packages.prefix }}bcmath
+ - {{ php_packages.prefix }}curl
+ - {{ php_packages.prefix }}gd
+ - {{ php_packages.prefix }}intl
+ - {{ php_packages.prefix }}mbstring
+ - {{ php_packages.prefix }}soap
+ - {{ php_packages.prefix }}xml
+ - {{ php_packages.prefix }}xsl
- - {{ packages_prefixes.php }}calendar
- - {{ packages_prefixes.php }}ctype
- - {{ packages_prefixes.php }}dom
- - {{ packages_prefixes.php }}fileinfo
- - {{ packages_prefixes.php }}filter
- - {{ packages_prefixes.php }}gettext
- - {{ packages_prefixes.php }}iconv
- - {{ packages_prefixes.php }}mysqli
- - {{ packages_prefixes.php }}pcntl
- - {{ packages_prefixes.php }}pdo
- - {{ packages_prefixes.php }}phar
- - {{ packages_prefixes.php }}session
- - {{ packages_prefixes.php }}simplexml
- - {{ packages_prefixes.php }}sodium
- - {{ packages_prefixes.php }}sockets
- - {{ packages_prefixes.php }}tokenizer
- - {{ packages_prefixes.php }}xmlreader
- - {{ packages_prefixes.php }}xmlwriter
- - {{ packages_prefixes.php }}zip
- - {{ packages_prefixes.php }}zlib
+ - {{ php_packages.prefix }}calendar
+ - {{ php_packages.prefix }}ctype
+ - {{ php_packages.prefix }}dom
+ - {{ php_packages.prefix }}fileinfo
+ - {{ php_packages.prefix }}filter
+ - {{ php_packages.prefix }}gettext
+ - {{ php_packages.prefix }}iconv
+ - {{ php_packages.prefix }}mysqli
+ - {{ php_packages.prefix }}pcntl
+ - {{ php_packages.prefix }}pdo
+ - {{ php_packages.prefix }}phar
+ - {{ php_packages.prefix }}session
+ - {{ php_packages.prefix }}simplexml
+ - {{ php_packages.prefix }}sodium
+ - {{ php_packages.prefix }}sockets
+ - {{ php_packages.prefix }}tokenizer
+ - {{ php_packages.prefix }}xmlreader
+ - {{ php_packages.prefix }}xmlwriter
+ - {{ php_packages.prefix }}zip
+ - {{ php_packages.prefix }}zlib
- - {{ packages_prefixes.php }}pdo_mysql
- - {{ packages_prefixes.php }}pdo_pgsql
- - {{ packages_prefixes.php }}pdo_sqlite
+ - {{ php_packages.prefix }}pdo_mysql
+ - {{ php_packages.prefix }}pdo_pgsql
+ - {{ php_packages.prefix }}pdo_sqlite
# PECL extensions
- - {{ packages_prefixes.pecl }}yaml
+ - {{ php_packages.prefix }}pecl-yaml
# PHP utilities
- - {{ packages.composer }}
+ - {{ php_packages.prefix }}composer
{% endif %}

File Metadata

Mime Type
text/plain
Expires
Fri, Jul 3, 14:05 (3 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3887357
Default Alt Text
D3952.diff (6 KB)

Event Timeline