```bash
Examining bind/files/named.conf.logging.jinja of type state
[206] Jinja variables should have spaces before and after: {{ var_name }}
bind/files/named.conf.logging.jinja:6
channel {{channel}} {
[201] Trailing whitespace
bind/files/named.conf.logging.jinja:8
file "{{ map.log_dir }}/{{salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':file')}}" versions {{salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':versions', '3')}} size {{salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':size', '20m')}};
[204] Lines should be no longer that 160 chars
bind/files/named.conf.logging.jinja:8
file "{{ map.log_dir }}/{{salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':file')}}" versions {{salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':versions', '3')}} size {{salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':size', '20m')}};
[206] Jinja variables should have spaces before and after: {{ var_name }}
bind/files/named.conf.logging.jinja:8
file "{{ map.log_dir }}/{{salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':file')}}" versions {{salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':versions', '3')}} size {{salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':size', '20m')}};
[206] Jinja variables should have spaces before and after: {{ var_name }}
bind/files/named.conf.logging.jinja:20
severity {{salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':severity')}};
[206] Jinja variables should have spaces before and after: {{ var_name }}
bind/files/named.conf.logging.jinja:23
syslog {{salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':syslog')}};
[206] Jinja variables should have spaces before and after: {{ var_name }}
bind/files/named.conf.logging.jinja:29
category {{category}} { {{ salt['pillar.get']('bind:config:use_extensive_logging:category:'+category, []) | join('; ') }}; };
```
```bash
Examining bind/files/named.conf.local.jinja of type state
[206] Jinja variables should have spaces before and after: {{ var_name }}
bind/files/named.conf.local.jinja:49
allow-update { {{args['allow-update']}}; };
```
```bash
Examining bind/config.sls of type state
[204] Lines should be no longer that 160 chars
bind/config.sls:217
{%- do generate_reverse(zone_records, salt['pillar.get']('bind:available_zones:' + zone + ':generate_reverse:net'), salt['pillar.get']('bind:available_zones:' + zone + ':generate_reverse:for_zones'), salt['pillar.get']('bind:available_zones', {})) %}
[206] Jinja variables should have spaces before and after: {{ var_name }}
bind/config.sls:225
zones{{ dash_view }}-{{ zone }}{{ '.include' if serial_auto else ''}}:
[206] Jinja variables should have spaces before and after: {{ var_name }}
bind/config.sls:227
- name: {{ zones_directory }}/{{ file }}{{ '.include' if serial_auto else ''}}
[206] Jinja variables should have spaces before and after: {{ var_name }}
bind/config.sls:295
- unless: "grep {{ key_flags.zsk }} {{ key_directory }}/K{{zone}}.+{{ key_algorithm_field }}+*.key"
[206] Jinja variables should have spaces before and after: {{ var_name }}
bind/config.sls:304
- unless: "grep {{ key_flags.ksk }} {{ key_directory }}/K{{zone}}.+{{ key_algorithm_field }}+*.key"
```
Update named.conf.local.jinja
Some reorganization of the format.
In the for-loop that handles configured_views:
- Add if-block on lines 124-128 to allow specifying a file for your view, rather than defaulting to the name of the specified zone. This allows multiple views to serve the same zone, but use a different file.
Update pillar.example
Add documentation and an example on specifying the file to be used for a view, as well as documented that you should not define the top-level 'configured_zones' key when using views.
Small comment update.
Add comment about using ACLs and views.
Create pillar-with-views.example
An example of the bind pillar that defines multiple views for internal and external record sets.
This doesn't include the other portion of the pillar the defines the bind config - this is zones, views and ACLs only. The config portion is not affected by this.
Add more comment clarification.
Add comment explaining file name requirements.
The filename must match the corresponding zone name (without the .txt extension) because the config.sls jinja logic uses the filename to match to the zone when setting zone_records. It also is hardcoded to replace ".txt" with "" in order to make this match work, and so .txt extension is required for the logic to work.
Update config.sls
Add logic to detect a file specified in a view, and match it to a zone under available_zones to enable creating that zone file.
Revert back
Made a bad commit.
Update with the required logic.
Added an if-block to test for the file argument in the zone_data, and if found, use that view and update the zone variable to match the zone defined under available_zones.
Fix variable set.
Set zone based on file with the .txt extension removed.
Update README.rst
Add paragraph about using views.
Update pillar-with-views.example
Add some more comments for explanation.
To process hash entries in deterministic order.
Without this patch, config entries were different for every run
and required a service restart when nothing actually changed.
Doing it similar to
0fe2f7e66b
As all but Debian based distros seem to put the zonefiles in
`named_directory` itself it's been removed from `map.jinja` for all but
debian.
Within `bind.config` we set `zones_directory` to `named_directory` if
not defined in `map.jinja`/pillar.
All zonefile actions then write using the `zones_directory` variable.
This allows the `named_directory` to be the base bind directory as it should so it can be used as a base variable for other directories. Then use the `zones_directory` for placing the zone files in.