{% macro conf(funcs, values) -%} [options] ; Paths data_dir = {{ values.consts.data_path }} addons_path = {{ values.consts.addons_path }} ; Network Details http_enable = True http_port = {{ values.network.web_port.port_number }} ; Database Details db_port = 5432 db_sslmode = disable db_host = {{ values.consts.postgres_container_name }} db_name = {{ values.consts.db_name }} db_user = {{ values.consts.db_user }} db_password = {{ values.odoo.db_password }} {%- set keys = values.odoo.additional_conf | map(attribute="key") | list %} {%- if keys | length != keys | unique | list | length %} {%- do funcs.fail("Duplicate keys are not allowed in [odoo.additional_conf], but got [%s]" | format(keys | join(","))) %} {%- endif %} {%- for item in values.odoo.additional_conf %} {%- if item.key in values.consts.reserved_keys %} {%- do funcs.fail("The key [%s] is reserved and cannot be used." | format(item.key)) %} {%- endif %} {{ "%s = %s" | format(item.key, item.value) }} {%- endfor %} {% endmacro %}