{% set settings = php.ini.defaults %} | {% set settings = php.ini.defaults %} | ||||
{% do settings.update(php.apache2.ini.settings) %} | {% do settings.update(php.apache2.ini.settings) %} | ||||
include: | |||||
- php.ng.deprecated | |||||
php_apache2_ini: | php_apache2_ini: | ||||
{{ php_ini(php.lookup.apache2.ini, php.apache2.ini.opts, settings) }} | {{ php_ini(php.lookup.apache2.ini, php.apache2.ini.opts, settings) }} |
{% if grains['os_family'] in ["Debian", "FreeBSD"] %} | {% if grains['os_family'] in ["Debian", "FreeBSD"] %} | ||||
include: | include: | ||||
- php.ng.deprecated | |||||
- php.ng.apache2.install | - php.ng.apache2.install | ||||
{% endif %} #END: os = Debian|FreeBSD | {% endif %} #END: os = Debian|FreeBSD | ||||
{% if grains['os_family'] == "Debian" %} | {% if grains['os_family'] == "Debian" %} |
{% from "php/ng/map.jinja" import php with context %} | {% from "php/ng/map.jinja" import php with context %} | ||||
include: | |||||
- php.ng.deprecated | |||||
{% set state = 'apache2' %} | {% set state = 'apache2' %} | ||||
{% include "php/ng/installed.jinja" %} | {% include "php/ng/installed.jinja" %} | ||||
{% from "php/ng/map.jinja" import php with context %} | {% from "php/ng/map.jinja" import php with context %} | ||||
{% from "php/ng/ini.jinja" import php_ini %} | {% from "php/ng/ini.jinja" import php_ini %} | ||||
include: | |||||
- php.ng.deprecated | |||||
{% set settings = php.ini.defaults %} | {% set settings = php.ini.defaults %} | ||||
{% for key, value in php.cli.ini.settings.items() %} | {% for key, value in php.cli.ini.settings.items() %} | ||||
{% if settings[key] is defined %} | {% if settings[key] is defined %} |
# Installs php-cli and manages the associated php.ini | # Installs php-cli and manages the associated php.ini | ||||
include: | include: | ||||
- php.ng.deprecated | |||||
- php.ng.cli.install | - php.ng.cli.install | ||||
- php.ng.cli.ini | - php.ng.cli.ini | ||||
{% set state = 'cli' %} | {% set state = 'cli' %} | ||||
{% include "php/ng/installed.jinja" %} | {% include "php/ng/installed.jinja" %} | ||||
include: | |||||
- php.ng.deprecated | |||||
{%- if salt['grains.get']('os_family') == "Debian" %} | {%- if salt['grains.get']('os_family') == "Debian" %} | ||||
{% set current_php = salt['alternatives.show_current']('php') %} | {% set current_php = salt['alternatives.show_current']('php') %} | ||||
{% set phpng_version = salt['pillar.get']('php:ng:version', '7.0')|string %} | {% set phpng_version = salt['pillar.get']('php:ng:version', '7.0')|string %} |
{% set salt_user_home = salt['user.info'](salt_user).get('home', '/root') %} | {% set salt_user_home = salt['user.info'](salt_user).get('home', '/root') %} | ||||
include: | include: | ||||
- php.ng.deprecated | |||||
- php.ng | - php.ng | ||||
{% if grains['os_family'] == 'FreeBSD' %} | {% if grains['os_family'] == 'FreeBSD' %} | ||||
- php.ng.filter | - php.ng.filter |
# -*- coding: utf-8 -*- | |||||
# vim: ft=sls | |||||
{#- Evaluating as `False` by default, using this method since `defaults.yaml` not available in this repo #} | |||||
{%- if not salt['config.get']('php').get('warning_messages', {}).get('v1.0.0', {}).get('mute_upcoming', False) %} | |||||
php-deprecated-in-v1.0.0-test-succeed: | |||||
test.succeed_without_changes: | |||||
- name: | | |||||
################################################################################ | |||||
# # | |||||
# WARNING: BREAKING CHANGES IN UPCOMING VERSION `v1.0.0` # | |||||
# # | |||||
################################################################################ | |||||
# # | |||||
# This formula currently provides two methods for managing PHP; the old method # | |||||
# under `php` and the new method under `php.ng`. In upcoming `v1.0.0`, the old # | |||||
# method will be removed and `php.ng` will be promoted to `php` in its place. # | |||||
# # | |||||
# If you are not in a position to migrate, you will need to pin your repo to # | |||||
# the final release tag before `v1.0.0`, which is expected to be `v0.37.1`. # | |||||
# # | |||||
# If you are currently using `php.ng`, there is nothing to do until `v1.0.0` # | |||||
# is released. # | |||||
# # | |||||
# To migrate from the old `php`, the first step is to convert to `php.ng`, # | |||||
# before `v1.0.0` is released. # | |||||
# # | |||||
# To prevent this message being displayed again, set the pillar/config value: # | |||||
# # | |||||
# ``` # | |||||
# php: # | |||||
# warning_messages: # | |||||
# v1.0.0: # | |||||
# mute_upcoming: True # | |||||
# ``` # | |||||
# # | |||||
################################################################################ | |||||
{%- endif %} |
{% from 'php/ng/map.jinja' import php with context %} | {% from 'php/ng/map.jinja' import php with context %} | ||||
{% from "php/ng/ini.jinja" import php_ini %} | {% from "php/ng/ini.jinja" import php_ini %} | ||||
include: | |||||
- php.ng.deprecated | |||||
{% set ini_settings = php.ini.defaults %} | {% set ini_settings = php.ini.defaults %} | ||||
{% for key, value in php.fpm.config.ini.settings.items() %} | {% for key, value in php.fpm.config.ini.settings.items() %} | ||||
{% if ini_settings[key] is defined %} | {% if ini_settings[key] is defined %} |
# Meta-state to fully install php.fpm | # Meta-state to fully install php.fpm | ||||
include: | include: | ||||
- php.ng.deprecated | |||||
- php.ng.fpm.config | - php.ng.fpm.config | ||||
- php.ng.fpm.service | - php.ng.fpm.service | ||||
- php.ng.fpm.pools | - php.ng.fpm.pools |
include: | |||||
- php.ng.deprecated | |||||
{% set state = 'fpm' %} | {% set state = 'fpm' %} | ||||
{% include "php/ng/installed.jinja" %} | {% include "php/ng/installed.jinja" %} |
{% endmacro %} | {% endmacro %} | ||||
include: | include: | ||||
- php.ng.deprecated | |||||
- php.ng.fpm.service | - php.ng.fpm.service | ||||
- php.ng.fpm.pools_config | - php.ng.fpm.pools_config | ||||
{% from 'php/ng/map.jinja' import php with context %} | {% from 'php/ng/map.jinja' import php with context %} | ||||
{% from "php/ng/macro.jinja" import sls_block, serialize %} | {% from "php/ng/macro.jinja" import sls_block, serialize %} | ||||
include: | |||||
- php.ng.deprecated | |||||
# Simple path concatenation. | # Simple path concatenation. | ||||
{% macro path_join(file, root) -%} | {% macro path_join(file, root) -%} | ||||
{{ root ~ '/' ~ file }} | {{ root ~ '/' ~ file }} |
{% set service_function = {True:'running', False:'dead'}.get(php.fpm.service.enabled) %} | {% set service_function = {True:'running', False:'dead'}.get(php.fpm.service.enabled) %} | ||||
include: | include: | ||||
- php.ng.deprecated | |||||
- php.ng.fpm.install | - php.ng.fpm.install | ||||
php_fpm_service: | php_fpm_service: |
{% from "php/ng/map.jinja" import php with context %} | {% from "php/ng/map.jinja" import php with context %} | ||||
{% from "php/ng/ini.jinja" import php_ini %} | {% from "php/ng/ini.jinja" import php_ini %} | ||||
include: | |||||
- php.ng.deprecated | |||||
{% set server_settings = php.lookup.hhvm.server %} | {% set server_settings = php.lookup.hhvm.server %} | ||||
{% do server_settings.update(php.hhvm.config.server.settings) %} | {% do server_settings.update(php.hhvm.config.server.settings) %} | ||||
# Meta-state to fully install php.hhvm | # Meta-state to fully install php.hhvm | ||||
include: | include: | ||||
- php.ng.deprecated | |||||
- php.ng.hhvm.repo | - php.ng.hhvm.repo | ||||
- php.ng.hhvm.config | - php.ng.hhvm.config | ||||
- php.ng.hhvm.service | - php.ng.hhvm.service |
include: | |||||
- php.ng.deprecated | |||||
{% set state = 'hhvm' %} | {% set state = 'hhvm' %} | ||||
{% include "php/ng/installed.jinja" %} | {% include "php/ng/installed.jinja" %} |
{% from "php/ng/map.jinja" import php with context %} | {% from "php/ng/map.jinja" import php with context %} | ||||
include: | include: | ||||
- php.ng.deprecated | |||||
- php.ng.hhvm.install | - php.ng.hhvm.install | ||||
{% set service_function = {True:'running', False:'dead'}.get(php.hhvm.service.enabled) %} | {% set service_function = {True:'running', False:'dead'}.get(php.hhvm.service.enabled) %} | ||||
include: | include: | ||||
- php.ng.deprecated | |||||
- php.ng.hhvm.install | - php.ng.hhvm.install | ||||
php_hhvm_service: | php_hhvm_service: | ||||
- require: | - require: | ||||
- sls: php.ng.hhvm.install | - sls: php.ng.hhvm.install | ||||
- watch: | - watch: | ||||
- pkg: php_install_hhvm | |||||
- pkg: php_install_hhvm | |||||
{% from "php/ng/map.jinja" import php with context %} | {% from "php/ng/map.jinja" import php with context %} | ||||
{% from "php/ng/macro.jinja" import sls_block %} | {% from "php/ng/macro.jinja" import sls_block %} | ||||
include: | |||||
- php.ng.deprecated | |||||
{% set pkginfo = php.lookup.pkgs.get(state) %} | {% set pkginfo = php.lookup.pkgs.get(state) %} | ||||
- __env__: | - __env__: | ||||
- LC_ALL: C.UTF-8 | - LC_ALL: C.UTF-8 | ||||
- onlyif: | - onlyif: | ||||
- test ! -e /etc/apt/sources.list.d/ondrej-php.list | |||||
- test ! -e /etc/apt/sources.list.d/ondrej-php.list | |||||
- require_in: | - require_in: | ||||
- pkg: php_install_{{ state }} | - pkg: php_install_{{ state }} | ||||
pkg.latest: | pkg.latest: |
include: | |||||
- php.ng.deprecated | |||||
{% set state = 'mdb2' %} | {% set state = 'mdb2' %} | ||||
{% include "php/ng/installed.jinja" %} | {% include "php/ng/installed.jinja" %} |
include: | |||||
- php.ng.deprecated | |||||
{% set state = 'mdb2-driver-mysql' %} | {% set state = 'mdb2-driver-mysql' %} | ||||
{% include "php/ng/installed.jinja" %} | {% include "php/ng/installed.jinja" %} | ||||
{% include "php/ng/mdb2/init.sls" %} | {% include "php/ng/mdb2/init.sls" %} |
include: | |||||
- php.ng.deprecated | |||||
{% set state = 'mdb2-driver-pgsql' %} | {% set state = 'mdb2-driver-pgsql' %} | ||||
{% include "php/ng/installed.jinja" %} | {% include "php/ng/installed.jinja" %} | ||||
{% include "php/ng/mdb2/init.sls" %} | {% include "php/ng/mdb2/init.sls" %} |
{% from "php/ng/map.jinja" import php with context %} | {% from "php/ng/map.jinja" import php with context %} | ||||
include: | include: | ||||
- php.ng.deprecated | |||||
- php.ng | - php.ng | ||||
- php.ng.dev | - php.ng.dev | ||||
{% from "php/ng/map.jinja" import php with context %} | {% from "php/ng/map.jinja" import php with context %} | ||||
{% from "php/ng/ini.jinja" import php_ini %} | {% from "php/ng/ini.jinja" import php_ini %} | ||||
include: | |||||
- php.ng.deprecated | |||||
{% set settings = php.xcache.ini.defaults %} | {% set settings = php.xcache.ini.defaults %} | ||||
{% for key, value in php.xcache.ini.settings.items() %} | {% for key, value in php.xcache.ini.settings.items() %} | ||||
{% if settings[key] is defined %} | {% if settings[key] is defined %} |
# Installs php-xcache and manages the associated xcache.ini | # Installs php-xcache and manages the associated xcache.ini | ||||
include: | include: | ||||
- php.ng.deprecated | |||||
- php.ng.xcache.install | - php.ng.xcache.install | ||||
- php.ng.xcache.ini | - php.ng.xcache.ini | ||||
include: | |||||
- php.ng.deprecated | |||||
{% set state = 'xcache' %} | {% set state = 'xcache' %} | ||||
{% include "php/ng/installed.jinja" %} | {% include "php/ng/installed.jinja" %} |
warning_messages: # | warning_messages: # | ||||
v1.0.0: # | v1.0.0: # | ||||
mute_critical: True # | mute_critical: True # | ||||
mute_upcoming: True # | |||||
# Use external repository instead the default (only Ubuntu family) | # Use external repository instead the default (only Ubuntu family) | ||||
use_external_repo: True | use_external_repo: True | ||||
# Set the external repository name (valid only if use_external_repo is not none) | # Set the external repository name (valid only if use_external_repo is not none) |