๐Ÿ“— 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.
ansible-playbooks/roles/clamav/templates/config.j2

17 lines
475 B

2 years ago
{% macro clamav_option(option) -%}
{% set key = option.key.split('_') | map('capitalize') | join('') -%}
{% if option.value is boolean -%}
{{ key }} {{ 'yes' if option.value else 'no' }}
{% elif option.value != None -%}
{{ key }} {{ option.value }}
{% endif -%}
{% endmacro -%}
{% if clamav_cfg[item.section] is mapping -%}
{% for option in (clamav_cfg[item.section] | d({}) | dict2items) -%}
{{ clamav_option(option) }}
{%- endfor %}
{% endif -%}