Do not modify configured_views dict

the pillar dict is passed by reference so we should not update it,
update a newly created dict instead
This commit is contained in:
Vladimir Nadvornik 2018-06-01 16:19:59 +02:00
parent 3310f90bb2
commit 59502abac3

View file

@ -168,8 +168,8 @@ bind_rndc_client_config:
{%- endif %}
{% endif %}
{%- set views = salt['pillar.get']('bind:configured_views', {}) %}
{%- do views.update({False: salt['pillar.get']('bind', {})}) %}{# process non-view zones in the same loop #}
{%- set views = {False: salt['pillar.get']('bind', {})} %}{# process non-view zones in the same loop #}
{%- do views.update(salt['pillar.get']('bind:configured_views', {})) %}
{%- for view, view_data in views.items() %}
{%- set dash_view = '-' + view if view else '' %}
{% for zone, zone_data in view_data.get('configured_zones', {}).items() -%}