Open ruan-dt opened 2 years ago
Hi @ruan-dt
Can you provide the playbook you were using with this role, and it will provide more insight as to what your particular issue is.
We can then look at closer....
@blofeldthefish so, finally having a little time to get back to this again:
has no attribute 'serial'
error.Minimal host file:
host0 field_subnet="172.20.4.0/22"
host1 field_subnet="172.20.8.0/22"
Minimal playbook:
- name: configure hosts
hosts:
- host0
- host1
vars:
field_ip: "{{ field_subnet | ansible.netcommon.ipaddr('net') | ansible.netcommon.ipaddr('1') | ansible.netcommon.ipaddr('address') }}"
roles:
- role: bertvv.bind
become: yes
# if this is missing, the version of bind on ubuntu 22.04 will raise a grumpy
# "option 'dnssec-enable' no longer exists" error.
bind_dnssec_enable: false
bind_zones:
- name: "{{ site_name }}"
type: primary
primaries:
- "{{ field_ip }}"
name_servers:
- "gateway."
hosts:
- name: gateway
ip: "{{ field_ip }}"
Can confirm this issue. Not sure why, but it works fine on the first server in the group, but not for the following servers.
For example is hosts: group_name
vs hosts: server.domain.name
.
Originally i thought the issue was that the serial is only calculated as a run_once
at tasks/main.yml line 78.
- name: Create serial, based on UTC UNIX time
command: date -u +%s
register: timestamp
changed_when: false
run_once: true
check_mode: false
tags: bind
However, I am not sure now. I tried modifying the serial and removing the run once and it kept happening.
Ok. Have it working. The issue appears to be not only that timestamp was created for only one host. It could actually deal with that in the zone template.
The main issue is that the hash'es for the zone files were not being calculated on any other host after the first one. Which causes the issue in the zone template. My workaround atm is to change all the zone hash tasks in tasks/zones.yml with run once to false. And it works fine.
Not sure how this will affect non primary nameservers, as I am not running them that way.
Is there a fix for this issue short of forking the repository and getting rid of run_once on those tasks?
Short error output:
Running with
-vvv
didn't obviously turn up anything more useful, but I can add that output if needs be.Is this me doing something wrong? Having only been using ansible for a few weeks, and lacking supervision, I can't really tell myself.