Skip to content

Commit 1b421d8

Browse files
committed
Update documentation accordingly
1 parent 4ab7ca3 commit 1b421d8

File tree

1 file changed

+32
-20
lines changed

1 file changed

+32
-20
lines changed

README.rst

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ Install the bind package and start the bind service.
2424
---------------
2525

2626
Manage the bind configuration file.
27-
This state can generate some basic zone files if a `records` entry is found in the
28-
`available_zones`' declaration for the zone (see `pillar.example` for how to write these)
2927

3028
Example Pillar
3129
==============
@@ -52,23 +50,6 @@ Example Pillar
5250
cat: 2.3.4.188
5351
rat: 1.2.3.231
5452
live: 1.2.3.236
55-
56-
See *bind/pillar.example* for a more complete example.
57-
58-
On the other hand, if no `records` entry exists, the zone file is not generated by this state
59-
rather than taken from `salt://zones`. See `pillar.example` for how to overwrite
60-
this URL.
61-
62-
Example Pillar
63-
==============
64-
65-
.. code:: yaml
66-
67-
bind:
68-
configured_zones:
69-
sub.domain.com:
70-
type: master
71-
notify: False
7253
configured_views:
7354
myview1:
7455
match_clients:
@@ -79,7 +60,38 @@ Example Pillar
7960
type: master
8061
notify: False
8162
82-
See *bind/pillar.example*.
63+
See *bind/pillar.example* for a more complete example.
64+
65+
Management of zone files
66+
========================
67+
68+
`named.conf.local`
69+
------------------
70+
71+
<zone> entries in `named.conf.local` will point to the file declared in
72+
73+
* `bind:configured_zones:<zone>:file` (this takes precedence)
74+
* `bind:available_zones:<zone>:file`
75+
76+
zone files
77+
----------
78+
79+
The `config.sls` state will iterate on `bind:available_zones` and manage
80+
<zone> files for each <zone> that has bind:available_zones:<zone>:file`
81+
declared.
82+
83+
* If `bind:available_zones:<zone>:records` exist, a zone file will be created
84+
using those records (see pillar.example for more details)
85+
* If `bind:available_zones:<zone>:records` is **NOT** declared,
86+
`bind:available_zones:<zone>:file` should point to an existing zone file
87+
that will be **sourced** by the formula.
88+
89+
External zone files
90+
-------------------
91+
92+
To use an external tool to manage the <zone> file, simply declare the location
93+
of the zone file in `bind:configured_zones:<zone>:file` and **don't** add any
94+
entry for the <zone> in `bind:available_zones`
8395

8496
Notes
8597
=====

0 commit comments

Comments
 (0)