THE GAME HAS CHANGED

Introducing Infoblox Universal DDI ManagementTM

Watch the launch to discover the new era of management for critical network services. Watch Now

API & Integration, DevOps,NetOps,SecOps

Reply

Issue with Ansible Plugin creating MX Records

New Member
Posts: 3
1897     0

Hi all,

 

I've been working on some DNS automation using Ansible and so far so good!

 

I've come up against one issue today that I can't seem to solve however. I'm tyring to use the nios_mx_record to add multiple MX Records to a single domain for example

 

Name: spencertest.com

mx: mx1.spencertest.com

priority: 10

 

Name: spencertest.com

mx: mx2.spencertest.com

priority: 10

 

Name: spencertest.com

mx: mx3.spencertest.com

priority: 10

 

The problem is that the way the Ansible plugin works is that it creates the first record and then when it runs the code for the second and third loop it simply updates the first record overwriting the mx entry. The upshot being that I end up with a single MX Record that looks like

 

Name: spencertest.com

mx: mx3.spencertest.com

priority: 10

 

I have proven that the script works for the following and that it creates 3 MX Records as expected.

 

Name: mx1.spencertest.com

mx: mx1.spencertest.com

priority: 10

 

Name: mx2.spencertest.com

mx: mx2.spencertest.com

priority: 10

 

Name: mx3.spencertest.com

mx: mx3.spencertest.com

priority: 10

 

 

Is anyone aware of any way around this? I'm unsure if this is an Ansible issue or an Infoblox API issue so any help would be appriciated.

 

Cheers

Spencer

 

Showing results for 
Search instead for 
Did you mean: 

Recommended for You