2016-12-13 22:37:53 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# vim: ft=jinja
|
2019-08-27 00:28:44 +02:00
|
|
|
{#- 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 %}
|
2014-06-06 19:14:44 +02:00
|
|
|
|
2019-08-27 00:28:44 +02:00
|
|
|
{% macro php_ini(filename, tofs_lookup, opts={}, settings={}) %}
|
2014-06-06 19:14:44 +02:00
|
|
|
file.managed:
|
|
|
|
{{ sls_block(opts) }}
|
|
|
|
- name: {{ filename }}
|
2019-08-27 00:28:44 +02:00
|
|
|
- source: {{ files_switch(['php.ini'],
|
|
|
|
tofs_lookup
|
|
|
|
) }}
|
2014-06-06 19:14:44 +02:00
|
|
|
- template: jinja
|
|
|
|
- context:
|
2019-03-26 18:31:43 +01:00
|
|
|
config: {{ serialize(odict(settings)) }}
|
2014-06-06 19:14:44 +02:00
|
|
|
{%- endmacro -%}
|