2013-09-03 15:51:19 -06:00
|
|
|
====
|
2013-06-12 23:39:14 -04:00
|
|
|
bind
|
|
|
|
====
|
|
|
|
|
2013-09-03 15:51:19 -06:00
|
|
|
Formulas to set up and configure the bind DNS server.
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
See the full `Salt Formulas installation and usage instructions
|
2014-07-28 19:44:47 -04:00
|
|
|
<http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html>`_.
|
2013-09-03 15:51:19 -06:00
|
|
|
|
|
|
|
Available states
|
|
|
|
================
|
|
|
|
|
|
|
|
.. contents::
|
|
|
|
:local:
|
|
|
|
|
|
|
|
``bind``
|
|
|
|
--------
|
|
|
|
|
|
|
|
Install the bind package and start the bind service.
|
|
|
|
|
|
|
|
``bind.config``
|
|
|
|
---------------
|
|
|
|
|
|
|
|
Manage the bind configuration file.
|
2017-07-12 08:38:07 -03:00
|
|
|
This state can generate some basic zone files if a `records` entry is found in the
|
|
|
|
`available_zones`' declaration for the zone (see `pillar.example` for how to write these)
|
|
|
|
|
|
|
|
Example Pillar
|
|
|
|
==============
|
|
|
|
|
|
|
|
.. code:: yaml
|
|
|
|
|
|
|
|
bind:
|
|
|
|
configured_zones:
|
|
|
|
example.com:
|
|
|
|
type: master
|
|
|
|
notify: False
|
|
|
|
available_zones:
|
|
|
|
example.com:
|
|
|
|
file: example.com.txt
|
|
|
|
soa:
|
|
|
|
ns: ns1.example.com # Required
|
|
|
|
contact: hostmaster.example.com # Required
|
|
|
|
serial: 2017041001 # Required
|
|
|
|
records: # Records for the zone, grouped by type
|
|
|
|
A:
|
|
|
|
mx1: # A RR with multiple values can
|
|
|
|
- 1.2.3.228 # be written as an array
|
|
|
|
- 1.2.3.229
|
|
|
|
cat: 2.3.4.188
|
|
|
|
rat: 1.2.3.231
|
|
|
|
live: 1.2.3.236
|
|
|
|
|
|
|
|
See *bind/pillar.example* for a more complete example.
|
|
|
|
|
|
|
|
On the other hand, if no `records` entry exists, the zone file is not generated by this state
|
|
|
|
rather than taken from `salt://zones`. See `pillar.example` for how to overwrite
|
2016-06-01 19:17:27 +02:00
|
|
|
this URL.
|
2013-09-03 15:51:19 -06:00
|
|
|
|
2014-07-30 13:06:10 -04:00
|
|
|
Example Pillar
|
|
|
|
==============
|
2013-09-03 15:51:19 -06:00
|
|
|
|
|
|
|
.. code:: yaml
|
2013-06-12 23:39:14 -04:00
|
|
|
|
2013-09-03 15:51:19 -06:00
|
|
|
bind:
|
2015-03-22 22:10:01 +01:00
|
|
|
configured_zones:
|
|
|
|
sub.domain.com:
|
|
|
|
type: master
|
|
|
|
notify: False
|
|
|
|
configured_views:
|
|
|
|
myview1:
|
|
|
|
match_clients:
|
|
|
|
- client1
|
|
|
|
- client2
|
|
|
|
configured_zones:
|
|
|
|
my.zone:
|
|
|
|
type: master
|
|
|
|
notify: False
|
|
|
|
|
|
|
|
See *bind/pillar.example*.
|
2015-03-22 22:07:22 +01:00
|
|
|
|
|
|
|
Notes
|
|
|
|
=====
|
|
|
|
|
|
|
|
* When using views all zones must be configured in views!
|
2018-05-26 18:54:26 -03:00
|
|
|
|
|
|
|
Salt Compatibility
|
|
|
|
==================
|
|
|
|
|
|
|
|
Tested with:
|
|
|
|
|
|
|
|
* 2017.7.x
|
|
|
|
* 2018.3.x
|
|
|
|
|
|
|
|
OS Compatibility
|
|
|
|
================
|
|
|
|
|
|
|
|
Tested with:
|
|
|
|
|
|
|
|
* Archlinux
|
|
|
|
* CentOS 7
|
|
|
|
* Debian-8
|
|
|
|
* Debian-9
|
|
|
|
* Fedora-27
|
|
|
|
* Ubuntu-16.04
|
|
|
|
* Ubuntu-18.04
|