Initial commit
This commit is contained in:
commit
a5e756c280
18 changed files with 754 additions and 0 deletions
30
templates/postfixadmin/config.local.php.j2
Normal file
30
templates/postfixadmin/config.local.php.j2
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
/* {{ ansible_managed }} */
|
||||
|
||||
{% macro php_obj(obj) %}
|
||||
{%- if obj is string -%}
|
||||
'{{ obj|replace('\\', '\\\\')|replace('\'', '\\\'') }}'
|
||||
{%- elif obj is number -%}
|
||||
{{ obj }}
|
||||
{%- elif obj is boolean -%}
|
||||
{{ obj }}
|
||||
{%- elif obj is none -%}
|
||||
null
|
||||
{%- elif obj is mapping %}
|
||||
[
|
||||
{% for key, value in obj.items() %}
|
||||
'{{ key|replace('\\', '\\\\')|replace('\'', '\\\'') }}' => {{ php_obj(value)|indent }},
|
||||
{% endfor %}
|
||||
]
|
||||
{%- elif obj is iterable -%}
|
||||
[
|
||||
{% for item in obj %}
|
||||
{{ php_obj(item)|indent(first=true) }},
|
||||
{% endfor %}
|
||||
]
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
{% for key, value in mailserver.postfixadmin.config.items() %}
|
||||
$CONF['{{ key|replace('\\', '\\\\')|replace('\'', '\\\'') }}'] = {{ php_obj(value)|indent }};
|
||||
{% endfor %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue