8e79a3595c
- Implementation of libtofs on ini macro, pools_config and apache2 mod_php.conf + Introduction of tplroot on modified files + `{%-` consistency when possible
19 lines
594 B
Django/Jinja
19 lines
594 B
Django/Jinja
# -*- coding: utf-8 -*-
|
|
# vim: ft=jinja
|
|
{#- php.ini management macro. #}
|
|
{%- set tplroot = tpldir.split('/')[0] %}
|
|
{%- from tplroot ~ "/macro.jinja" import sls_block, serialize %}
|
|
{%- from tplroot ~ "/libtofs.jinja" import files_switch with context %}
|
|
|
|
{% macro php_ini(filename, tofs_lookup, opts={}, settings={}) %}
|
|
file.managed:
|
|
{{ sls_block(opts) }}
|
|
- name: {{ filename }}
|
|
- source: {{ files_switch(['php.ini'],
|
|
tofs_lookup
|
|
) }}
|
|
- template: jinja
|
|
- context:
|
|
config: {{ serialize(odict(settings)) }}
|
|
{%- endmacro -%}
|