Initial commit

This commit is contained in:
Julian Rother 2025-01-29 03:02:15 +01:00
commit a5e756c280
Signed by: julian
GPG key ID: C19B924C0CD13341
18 changed files with 754 additions and 0 deletions

View 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 %}