diff --git a/php/ng/fpm/pools_config.sls b/php/ng/fpm/pools_config.sls index fe255c5..80a9d2f 100644 --- a/php/ng/fpm/pools_config.sls +++ b/php/ng/fpm/pools_config.sls @@ -16,12 +16,12 @@ {{ state }}: {% if config.enabled %} file.managed: - {{ sls_block(config.opts) }} + {{ sls_block(config.get('opts', {})) }} - name: {{ fpath }} - source: salt://php/ng/files/php.ini - template: jinja - context: - config: {{ serialize(config.settings) }} + config: {{ serialize(config.get('settings', {})) }} {% else %} file.absent: - name: {{ fpath }} diff --git a/pillar.example b/pillar.example index 7bd42c8..e45f9ec 100644 --- a/pillar.example +++ b/pillar.example @@ -107,3 +107,34 @@ php: pm.min_spare_servers: 1 pm.max_spare_servers: 3 'php_admin_value[memory_limit]': 300M + + # php-cli settings + cli: + # settings to manage the cli's php.ini + ini: + # opts passed forward directly to file.managed + opts: + replace: False + # contents of the php.ini file that are merged with defaults + # from php.ng.ini.defaults. See php.ng.ini.defaults for ini-style + # syntax guidelines + settings: + PHP: + engine: 'Off' + + # global php.ini settings + ini: + # Default php.ini contents. These follow a strict format. The top- + # level dict keys form ini group headings. Nested key/value + # pairs represent setting=value statements. If a value is a list, + # its contents will be joined by commas in final rendering. + defaults: + PHP: + engine: on + output_buffering: 4096 + disable_functions: + - pcntl_alarm + - pcntl_fork + - pcntl_wait + 'CLI Server': + cli_server_color: 'On'