-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
nb
committed
Jul 18, 2019
1 parent
4dc3e14
commit 686866e
Showing
206 changed files
with
4,105 additions
and
5,185 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
{%- from "php/map.jinja" import php with context %} | ||
include: | ||
- php | ||
php-adodb: | ||
pkg.installed: | ||
- name: {{ php.adodb_pkg }} | ||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- set state = 'adodb' %} | ||
{%- include tplroot ~ "/installed.jinja" %} |
7 changes: 4 additions & 3 deletions
7
php/ng/apache2/files/mod_php.conf.jinja → php/apache2/files/mod_php.conf.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{%- if grains['os_family'] in ["Debian", "FreeBSD"] %} | ||
include: | ||
- php.apache2.install | ||
{%- endif %} #END: os = Debian|FreeBSD | ||
{%- if grains['os_family'] == "Debian" %} | ||
- php.apache2.ini | ||
|
||
extend: | ||
php_apache2_ini: | ||
file: | ||
- require: | ||
- sls: php.apache2.install | ||
{%- endif %} #END: os = debian |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- from tplroot ~ "/map.jinja" import php with context %} | ||
{%- set state = 'apache2' %} | ||
{%- include tplroot ~ "/installed.jinja" %} | ||
{%- if grains['os_family'] == "FreeBSD" %} | ||
{{ php.lookup.apache2.module_config }}: | ||
file.managed: | ||
- source: salt://php/apache2/files/mod_php.conf.jinja | ||
- template: jinja | ||
{%- if salt['pillar.get']('php:use_apache_formula', True) %} | ||
- makedirs: true | ||
- require_in: | ||
- sls: apache | ||
- watch_in: | ||
- module: apache-restart | ||
{%- endif %} #END: use apache formula | ||
{%- endif %} #END: os = debian |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
{%- from "php/map.jinja" import php with context %} | ||
include: | ||
- php | ||
php-apc: | ||
pkg.installed: | ||
- name: {{ php.apc_pkg }} | ||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- set state = 'apc' %} | ||
{%- include tplroot ~ "/installed.jinja" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
{%- from "php/map.jinja" import php with context %} | ||
include: | ||
- php | ||
php-apcu: | ||
pkg.installed: | ||
- name: {{ php.apcu_pkg }} | ||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- set state = 'apcu' %} | ||
{%- include tplroot ~ "/installed.jinja" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- set state = 'auth-sasl' %} | ||
{%- include tplroot ~ "/installed.jinja" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
{%- from "php/map.jinja" import php with context %} | ||
include: | ||
- php | ||
php-bcmath: | ||
pkg.installed: | ||
- name: {{ php.bcmath_pkg }} | ||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- set state = 'bcmath' %} | ||
{%- include tplroot ~ "/installed.jinja" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- set state = 'bz2' %} | ||
{%- include tplroot ~ "/installed.jinja" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- set state = 'cache-lite' %} | ||
{%- include tplroot ~ "/installed.jinja" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
{%- from "php/map.jinja" import php with context %} | ||
include: | ||
- php | ||
php-cgi: | ||
pkg.installed: | ||
- name: {{ php.cgi_pkg }} | ||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- set state = 'cgi' %} | ||
{%- include tplroot ~ "/installed.jinja" %} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Manages the php cli main ini file | ||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- from tplroot ~ "/map.jinja" import php with context %} | ||
{%- from tplroot ~ "/ini.jinja" import php_ini %} | ||
{%- set settings = php.ini.defaults %} | ||
{%- for key, value in php.cli.ini.settings.items() %} | ||
{%- if settings[key] is defined %} | ||
{%- do settings[key].update(value) %} | ||
{%- else %} | ||
{%- do settings.update({key: value}) %} | ||
{%- endif %} | ||
{%- endfor %} | ||
php_cli_ini: | ||
{{ php_ini(php.lookup.cli.ini, php.cli.ini.opts, settings) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
# Installs php-cli and manages the associated php.ini | ||
|
||
include: | ||
- php.ng.cli.install | ||
- php.ng.cli.ini | ||
- php.cli.install | ||
- php.cli.ini | ||
|
||
extend: | ||
php_cli_ini: | ||
file: | ||
- require: | ||
- sls: php.ng.cli.install | ||
- sls: php.cli.install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- set state = 'cli' %} | ||
{%- include tplroot ~ "/installed.jinja" %} | ||
|
||
{%- if salt['grains.get']('os_family') == "Debian" %} | ||
{%- set current_php = salt['alternatives.show_current']('php') %} | ||
{%- set php_version = salt['pillar.get']('php:version', '7.0')|string %} | ||
|
||
php_{{ php_version }}_link: | ||
alternatives.set: | ||
- name: php | ||
- path: /usr/bin/php{{ php_version }} | ||
- require_in: | ||
- pkg: php_install_{{ state }} | ||
- onlyif: | ||
- which php | ||
- test {{ current_php }} != $(which php{{ php_version }}) | ||
{%- endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- set state = 'console-table' %} | ||
{%- include tplroot ~ "/installed.jinja" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- set state = 'ctype' %} | ||
{%- include tplroot ~ "/installed.jinja" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
{%- from "php/map.jinja" import php with context %} | ||
include: | ||
- php | ||
php-curl: | ||
pkg.installed: | ||
- name: {{ php.curl_pkg }} | ||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- set state = 'curl' %} | ||
{%- include tplroot ~ "/installed.jinja" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- set state = 'dba' %} | ||
{%- include tplroot ~ "/installed.jinja" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
{%- from "php/map.jinja" import php with context %} | ||
include: | ||
- php | ||
php-dev: | ||
pkg.installed: | ||
- name: {{ php.dev_pkg }} | ||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- set state = 'dev' %} | ||
{%- include tplroot ~ "/installed.jinja" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- set state = 'dom' %} | ||
{%- include tplroot ~ "/installed.jinja" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- set state = 'fileinfo' %} | ||
{%- include tplroot ~ "/installed.jinja" %} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- set state = 'filter' %} | ||
{%- include tplroot ~ "/installed.jinja" %} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{% set state = 'fpm' %} | ||
{% include tplroot ~ "/installed.jinja" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Manages the php-fpm pools config files | ||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- from tplroot ~ "/map.jinja" import php with context %} | ||
{%- from tplroot ~ "/macro.jinja" import sls_block, serialize %} | ||
# Simple path concatenation. | ||
{%- macro path_join(file, root) -%} | ||
{{ root ~ '/' ~ file }} | ||
{%- endmacro %} | ||
{%- set pool_states = [] %} | ||
{%- for pool, config in php.fpm.pools.items() %} | ||
{%- if pool == 'defaults' %}{% continue %}{% endif %} | ||
{%- for pkey, pvalues in config.get('settings', {}).items() %} | ||
{%- set pool_defaults = php.fpm.pools.get('defaults', {}).copy() %} | ||
{%- do pool_defaults.update(pvalues) %} | ||
{%- do pvalues.update(pool_defaults) %} | ||
{%- endfor %} | ||
{%- set state = 'php_fpm_pool_conf_' ~ loop.index0 %} | ||
{%- set fpath = path_join(config.get('filename', pool), php.lookup.fpm.pools) %} | ||
{{ state }}: | ||
{%- if config.enabled %} | ||
file.managed: | ||
{{ sls_block(config.get('opts', {})) }} | ||
- name: {{ fpath }} | ||
- source: salt://php/files/php.ini | ||
- template: jinja | ||
- context: | ||
config: {{ serialize(config.get('settings', {})) }} | ||
{%- else %} | ||
file.absent: | ||
- name: {{ fpath }} | ||
{%- endif %} | ||
{%- do pool_states.append(state) %} | ||
{%- endfor %} |
Oops, something went wrong.