Open kemeris2000 opened 3 years ago
@kemeris2000 At first glance, it looks like the error is caused by the lack of nameservers
defined in the zone (see here: https://github.com/dubzland/ansible-role-bind9/blob/46c3627587b43109cf9c4cec9023f0b21279f38f/action_plugins/bind9_zone.py#L21).
I'll add a check for that and generate a better error message. In the meantime, define some nameservers (at least the one you're configuring) and you should be ok.
@t3hpr1m3 You are right, problem because of missing nameservers
. The following works:
dubzland_bind9_views:
- name: internal
match_clients:
- internals
recursion: 'no'
includes:
- '/etc/named.conf.internals'
zones:
- name: domain1.com
type: master
domain_name: domain1.com
nsupdate_key: DHCP_UPDATER
nameservers:
- name: ns1.domain1.com
- name: ns1.domain1.com
I think you should update example, as you code expect list of dictionary for nameservers
instead of list.
I get error "No first item, sequence was empty" when defining zone in view.
Any ideas what could be wrong?