Commit graph

70 commits

Author SHA1 Message Date
sylvainfaivre
2d069544f6 feat(config.sls): allow to not manage zone file 2021-09-13 14:32:35 +02:00
Mark Gomersbach
7415a9b0ce feat(map.jinja): add Gentoo support 2019-12-21 11:37:59 +00:00
Imran Iqbal
920615a067
fix(config.sls): fix salt-lint errors
```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"
```
2019-10-09 04:13:59 +01:00
Eric Veiras Galisson
120c2d1370 fix: corrected indentation on context in file.managed states 2019-04-11 14:57:51 +02:00
Alexander Weidinger
7fbe60c949 Fix bind/config.sls; use json() 2019-03-08 16:01:34 +01:00
Alexander Weidinger
56dc5da024 FreeBSD: support extensive logging 2018-11-30 02:11:05 +01:00
crux-capacitor
7e47c7658f Squash commits
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.
2018-11-16 16:28:41 -05:00
Bernhard M. Wiedemann
353a8dfc15 Sort hashes
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
2018-08-31 15:03:48 +02:00
Ryan Walder
819126ed50 Make zones_directory compatible with all distros
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.
2018-07-27 13:30:14 +01:00
Ryan Walder
2e8643fef4 Change zonefile include to use absolute path 2018-07-26 13:00:51 +01:00
Ryan Walder
ccbcd2a31c Add zones_directory variable to map
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.
2018-07-26 13:00:51 +01:00
Joe Bowman
019e1e4a58 fix named_directory bug in Debian/Ubuntu by using the map value instead of hardcoding 2018-07-13 11:40:50 +01:00
Joe Bowman
a8b703f877 remove superfluous signed-<zone> block, as the per-view block negates the need for this (as default view is still treated as a view); fixes #100 2018-07-09 14:24:15 +01:00
Javier Bértoli
72ea4cf544
Merge pull request #98 from aanriot/master
Add support for inline-signing, see #64 for details
2018-06-21 08:37:51 -03:00
Alexandre Anriot
82726fdb48 Add support for inline-signing, see #64 for details 2018-06-07 14:34:27 +02:00
Vladimir Nadvornik
4623fb5e60 Autogenerate reverse zones 2018-06-05 15:46:48 +02:00
Javier Bértoli
6e8652dcb3
Merge pull request #84 from nadvornik/serial
Auto-update zone file serial
2018-06-05 08:39:31 -03:00
Vladimir Nadvornik
2b99362435 Handle log file in chroot 2018-06-04 16:43:10 +02:00
Vladimir Nadvornik
59502abac3 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
2018-06-01 16:19:59 +02:00
Vladimir Nadvornik
3310f90bb2 De-duplicate views and non-views zone configuration 2018-06-01 15:39:22 +02:00
Vladimir Nadvornik
5d8a666b83 Use watch_in consistently on all files 2018-06-01 15:25:19 +02:00
Vladimir Nadvornik
30a42dbebd Auto-update zone file serial
use https://github.com/saltstack/salt/pull/15828
2018-06-01 15:25:19 +02:00
Alexandre Anriot
40d4be4f8f Fix misplaced parenthesis introduced in #92 2018-05-31 14:43:00 +02:00
Alexandre Anriot
32459c7604
Merge pull request #94 from netmanagers/refactor-named.conf.local_and_logging
Refactor named.conf.local & logging
2018-05-31 13:22:26 +02:00
Javier Bértoli
45e8128487 Refactor named.conf.local & logging across platforms 2018-05-26 19:57:58 -03:00
Alexandre Anriot
4ab7ca3580 Allow to use external zone files 2018-05-04 14:18:12 +02:00
Bernhard M. Wiedemann
1c725851b8 drop duplicate entry 2018-01-24 15:59:16 +01:00
Bernhard M. Wiedemann
ae9415c3e7 [suse]: fix passing map.local_config into template
avoids hard to debug messages about undefined Jinja variable 'map'
2018-01-24 15:48:15 +01:00
Niels Abspoel
da5e74a0d7
Merge pull request #80 from irtnog/add-bind-config-tmpl-option
Implement bind:config:tmpl Pillar key mentioned in pillar.example
2017-11-17 20:57:21 +01:00
Piotr Pieprzycki
978ce84b15 Added feature rndc clinet 2017-10-29 16:46:24 +00:00
Pieprzycki Piotr
2947dde649 New features and pillar.example 2017-10-18 22:35:21 +02:00
Matthew X. Economou
02141df8a8
Implement bind:config:tmpl Pillar key mentioned in pillar.example 2017-10-13 07:25:57 -04:00
Javier Bértoli
b7dc95ddbf Allow to generate zone files from pillar data 2017-07-12 08:38:07 -03:00
Kai
3ceaa7ca70 named.conf.key shouldn't be world readable 2017-07-11 22:40:56 -04:00
Javier Bértoli
bc3db8644c Merge pull request #71 from jdsieci/redhat_config_update
Redhat config update
2017-04-27 20:52:12 -03:00
Ted Strzalkowski
a1b8c78377 Fixes issue where query.log throws warning for replace=True 2017-04-25 11:56:39 -07:00
Jerzy Drozdz
2156b92221 Added configured_zones as file path source 2017-04-09 10:56:08 +02:00
Jerzy Drozdz
a8b0353c90 Set replace to False for query.log state 2017-03-25 02:18:26 +01:00
Alexander Weidinger
86099c1f71 FreeBSD: need different permissions for the log 2017-01-12 10:40:18 +01:00
Alexander Weidinger
d5981ae4b5 FreeBSD has no default config 2017-01-12 10:17:17 +01:00
Lev Lozhkin
609d3685b5 Templatize zone files
All other managed files are templatized, zone files should be also.
2016-07-08 03:58:13 -07:00
Florian
8b52b73753 iteritems() -> items(), fixes saltstack-formulas/bind-formula#30 2016-06-01 19:00:16 +02:00
jamesp9
5b1313f14b arch: initial 2015-11-09 20:46:35 +11:00
Rowcliffe Browne
82f4b63aa9 - templatize default file
- fix config.sls to match
- add example to pillar.example
2015-11-02 09:40:51 +08:00
Rowcliffe Browne
ed7aead85c allow bind to run in ipv4 or ipv6. if not specified, defaults to bind's default of both. 2015-10-30 18:28:43 +08:00
Gabriel Santos
9ff751e34b Fix conflicts with file names. Remove hardcoded zones location 2015-10-14 07:59:18 -03:00
Gabriel Santos
0b89c701c1 fix #38 2015-10-10 21:48:51 -03:00
Alex Eiswirth
1aba08b296 Fetch user from lookup table for static defaults (map.jinja)
This fixes the RHEL/CentOS configuration, because user 'bind' doesn't exist in RHEL.
2015-07-30 21:15:52 +02:00
Hung Nguyen Viet
2beaf0ec32 use group from map file, not hardcode 2015-03-25 10:31:57 +07:00
Hung Nguyen Viet
8972734ba0 require ID, not file path 2015-03-25 10:30:01 +07:00