Fix variable set.

Set zone based on file with the .txt extension removed.
This commit is contained in:
crux-capacitor 2018-11-16 08:48:51 -05:00 committed by GitHub
parent 342c0d7d08
commit e6636fe915
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -207,7 +207,7 @@ bind_rndc_client_config:
{%- for zone, zone_data in view_data.get('configured_zones', {})|dictsort -%}
{%- if 'file' in zone_data %}
{%- set file = zone_data.file %}
{%- set zone = zone|replace(".txt", "") %}
{%- set zone = file|replace(".txt", "") %}
{%- else %}
{%- set file = salt['pillar.get']("bind:available_zones:" + zone + ":file", false) %}
{%- endif %}