Comments (5)
@retr0h Can you share an example of the playbook & process you're using to create the SRV records? I'd like to clarify what the expected behavior is here.
Possibly related, I have a patch which enables powerdns_record
to add multiple hostnames to a single MX record entry. Assuming the behavior I implemented there is what you're looking for, it shouldn't take much to get it working for SRV records as well.
from ansible-module-powerdns.
The inventory:
pdns_svr_create:
- name: _mysql._udp.dnac.xxx.com.
zone: _udp.dnac.xxx.com
type: SRV
content: 0 5 9104 dnac-dashboard-mysql-slave.dnac-dashboard-production.svc.cluster.local.
ttl: 300
- name: _mysql._udp.dnac.xxx.com.
zone: _udp.dnac.xxx.com
type: SRV
content: 0 5 9104 dnac-dashboard-mysql-slave.dnac-dashboard-staging.svc.cluster.local.
ttl: 300
- name: _mysql._udp.dnac.xxx.com.
zone: _udp.dnac.xxx.com
type: SRV
content: 0 5 9104 dnac-dashboard-mysql-slave.dnac-dashboard-dev.svc.cluster.local.
ttl: 300
- name: _mysql._udp.dnac.xxx.com.
zone: _udp.dnac.xxx.com
type: SRV
content: 0 5 9104 dnac-dashboard-mysql.dnac-dashboard-production.svc.cluster.local.
ttl: 300
- name: _mysql._udp.dnac.xxx.com.
zone: _udp.dnac.xxx.com
type: SRV
content: 0 5 9104 dnac-dashboard-mysql.dnac-dashboard-staging.svc.cluster.local.
ttl: 300
- name: _mysql._udp.dnac.xxx.com.
zone: _udp.dnac.xxx.com
type: SRV
content: 0 5 9104 dnac-dashboard-mysql.dnac-dashboard-dev.svc.cluster.local.
ttl: 300
playbook
- hosts: dns-primary
become: true
tasks:
- name: Create records
powerdns_record:
name: "{{ item.name }}"
zone: "{{ item.zone }}"
type: "{{ item.type }}"
content: "{{ item.content }}"
ttl: "{{ item.ttl }}"
pdns_host: "{{ pdns_bind_address }}"
pdns_port: "{{ pdns_api_port }}"
pdns_api_key: "{{ pdns_api_password }}"
state: "{{ item.state | default('present') }}"
loop: "{{ pdns_hosts_create }}"
However, as reported in the original issue, only the last SRV record is ever added.
from ansible-module-powerdns.
@retr0h Just posted a PR which should resolve your issue. I tested these changes with the playbook you provided. The records are successfully created the after adding exclusive: no
to the powerdns_record
module parameters.
from ansible-module-powerdns.
I just tried this out, and oddly it doesn't appear to be working. I still only have one record (the last) even when passing exclusive: no
from ansible-module-powerdns.
Could you share which version of PowerDNS you’re using? Would you mind providing debugging output from the playbook run to assist with troubleshooting?
from ansible-module-powerdns.
Related Issues (17)
- idempotent is not working HOT 6
- Add a license HOT 1
- Support TXT records
- Can not create a zone (MODULE FAILURE - API is running)
- "DNS Name is not canonical error" HOT 1
- Support NS records HOT 2
- Support RFC 1912 checks HOT 1
- PTR Records `set-ptr` not working anymore from v4.3 and above HOT 2
- Ansible fails with "Error: No JSON Object could be decoded" on succesful run
- use module with search-data disabled
- Feature: content as a list? HOT 3
- requests must be installed to use this module HOT 2
- msg: 'Error: ' HOT 3
- Documentation erronenous: domain records should end in a "."
- Feature request: Disable SSL certificate checking
- Most operations fail with 404: Not Found
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-module-powerdns.