OK,
Looks likes the way that InfoBlox as been setup and I need to add a "fixed
address" rather than a host record.
Aidan
On Friday, May 4, 2018 at 10:57:44 AM UTC+1, ADB101 wrote:
>
> 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
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/1fee59b5-cb62-424a-8b09-456c54ad99e8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.