Hi Brandon-
Jinja is a *subset* of python, but the objects that you create are python objects. In python, the way to "merge" dicts is dict.update(). But you have to jump through a non-obvious hoop to get to it.
If you try just:
{% config.update(ntpconfig) %}
You'll get an error like "object not found", because there's no way to execute a statement that doesn't start with a jinja-imported value.
The ugly workaround is to access the 'config' object you've created in the context of a 'set' command. Since we don't care about the return value of the update method, I usually show that by doing:
{% set _throwaway = config.update(ntpconfig) %}
Since jinja doesn't support comprehenions, I've used the same trick to dynamically build data structures:
{% set my_list = [] %}
{% for val in some_iterator %}
{% if some_test(val) %}
{% set _throwaway = my_list.append(val) %}
{% endif %}
{% endfor %}
For dynamic dict-building you need *two* temp variables:
{% set my_dict = {} %}
{% for key,val in some_iterator %}
{% if some_test(key,val) %}
{% set _tmpdict = {key: val} %}
{% set _throwaway = my_dict.update(_tmpdict) %}
{% endif %}
{% endfor %}
Of course, the easier answer, since a map file is usually just setting data structures, is to just use the python renderer, but mixing that with jinja isn't supported yet in any released version (it did get merged into the develop branch, though). See this discussion from a month ago:
https://groups.google.com/forum/#!topic/salt-users/XaLvGQ2_RYI
That's probably way more verbose than you needed. Hope it helps.
-John