Introducing SOC Insights for BloxOne Threat Defense: Boost your SOC efficiency with AI-driven insights to eliminate manual work and accelerate investigation and response times. Read the blog announcement here.

BloxOne DNS DHCP IPAM

Reply

error trying to post host records using ansible url

[ Edited ]
New Member
Posts: 2
2399     0
Hi Guys
am trying to push a host record into infoblox but i keep getting an unrelated error, i'm new to infoblox so below is my code.   
 
- name: Push all the Dns data into Infoblox
      uri:
        url: "https://{{ infoblox_hostname }}/wapi/v2.7/record:host?_return_fields%2B=name,ipv4addrs&_return_as_object=1"
        force_basic_auth: yes
        validate_certs: false
        headers:
            Accept: "application/json"
            Content-Type: "application/json"
        user: "{{ infoblox_username }}"
        password: "{{ infoblox_password }}"
        method: POST
        body:
                "name": "ukaoa-r10-pts007"
                "ipv4addrs":
                  - "ipv4addr": "10.34.83.0"  

 

        status_code: [ "200", "201" ]
        body_format: json
        return_content: yes
      register: results_transport_post
      ignore_errors: true

this is the below error 
"failed": true,
310 "json": {
311 "Error": "AdmConDataError: None (IBDataConflictError: IB.Data.Conflict:The action is not allowed. A parent was not found.)",
312 "code": "Client.Ibap.Data.Conflict",
313 "text": "The action is not allowed. A parent was not found."
314 },
315 "msg": "Status code was 400 and not [200, 201]: HTTP Error 400: Bad Request",
 

Re: error trying to post host records using ansible url

New Member
Posts: 1
2400     0

When creating a name, ensure it is a fully qualified name, assuming that the domain you're adding the record to already exists. The method operates under the assumption that configure_for_dns is set to true, and thus, it seeks a parent domain for record addition.

 

 

        body:
                "name": "ukaoa-r10-pts007.<domain>"
                "ipv4addrs":
                  - "ipv4addr": "10.34.83.0"  
 
If you prefer not to have the record in DNS, include the following in your post:
 
"configure_for_dns": False
 
-Thanks,
 
-Mike
 
 

Professional Services

Re: error trying to post host records using ansible url

[ Edited ]
New Member
Posts: 1
2400     0

Thank you for sharing.

Cuyahoga County Auditor

Showing results for 
Search instead for 
Did you mean: 

Recommended for You