๐Ÿ“— Ansible playbooks and roles for building an idempotent, interconnected and scalable infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
664 B

2 years ago
{% macro acme_dns_option(option) -%}
{% if option.value is boolean -%}
{{ option.key }} = {{ 'true' if option.value else 'false' }}
{% elif option.value | type_debug == 'list' -%}
{{ option.key }} = [
{%- for s in option.value -%}
"{{- s -}}",
{%- endfor -%}
]
{% elif option.value != None -%}
{{ option.key }} = "{{ option.value }}"
{% endif -%}
{% endmacro -%}
{% for section in (acme_dns_cfg | d({}) | dict2items) -%}
[{{ section.key | lower }}]
{% for option in (section.value | d({}) | dict2items) -%}
{{ acme_dns_option(option) -}}
{% endfor %}
{%- if not loop.last %}
{% endif -%}
{% endfor %}