-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create forward lookup zone file: AnsibleUndefinedVariable: 'dict object' has no attribute 'serial' #183
Comments
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:
Minimal host file:
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 - 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 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. 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.
The text was updated successfully, but these errors were encountered: