# Infoblox - nios\_host\_record issue

**URL:** <https://forum.ansible.com/t/infoblox-nios-host-record-issue/27455>\
**Category:** Ansible Project\
**Created:** [May 4, 2018, 9:57am UTC](https://forum.ansible.com/t/infoblox-nios-host-record-issue/27455 "2018-05-04T09:57:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ADB101](https://avatars.discourse-cdn.com/v4/letter/a/b4bc9f/32.png) [@ADB101](https://forum.ansible.com/u/ADB101)\
**Post date:** [May 4, 2018, 9:57am UTC](https://forum.ansible.com/t/infoblox-nios-host-record-issue/27455/1 "2018-05-04T09:57:44Z")

</div>

Hi all,

I need to get IPs from an Infoblox server from an Ansible playbook. I am successfully obtaining the next IP address by using the nios\_next\_ip lookup within the correct IP range. I am then using the “nios\_host\_record” task to attempt to assign that IP in Infoblox. (Using Ansible 2.5.2)

`

- name: Get next available IP  
set\_fact:  
ipaddr: “{{ lookup(‘nios\_next\_ip’, IPAM\_RANGE, provider={‘host’: ‘ipam.mydomain’, ‘username’: ‘tower’, ‘password’: ss2\_result.TOWER\_IPAM|quote }) }}”  
connection: local

- debug: msg=“{{ipaddr[0]}}”

- name: configure an ipv4 host record  
nios\_host\_record:  
name: aidantest.mydomain  
ipv4:

- address: “{{ipaddr[0]}}”  
state: present  
provider:  
host: “ipam.mydomain”  
username: tower  
password: “{{ss2\_result.TOWER\_IPAM}}”  
connection: local

`

However, all I am getting back from the task is:

`  
“Client.Obap.Data.Conflict”, “msg”: “The action is not allowed. A parent was not found.”, “operation”: “create\_object”, “type”: “AdmConDataError”

`

The slight complication is that the Infobox is only used to hold a range of IPs and keep a record of what is allocated, it does not deal with DNS etc (that’s in Active Directory). I’m not sure if that has anything to do with the error, but thought best to mention it!

Has anyone got any ideas as to what I am doing wrong? I think I would have to specify the IP range in the nios\_host\_record call (like I do in the lookup) but I can’t see a way…?

Any assistance very much appreciated!

Aidan

---

<div class="post-metadata">

**Author:** ![ADB101](https://avatars.discourse-cdn.com/v4/letter/a/b4bc9f/32.png) [@ADB101](https://forum.ansible.com/u/ADB101)\
**Post date:** [May 4, 2018, 11:01am UTC](https://forum.ansible.com/t/infoblox-nios-host-record-issue/27455/2 "2018-05-04T11:01:08Z")

</div>

OK,

Looks likes the way that InfoBlox as been setup and I need to add a “fixed address” rather than a host record.

Aidan
