Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
error trying to post host records using ansible url
[ Edited ]Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2023 04:36 AM - edited 12-09-2023 04:37 AM
3182     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.
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
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
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2023 07:09 PM
3183     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 ]Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2024 09:31 PM - edited 01-11-2024 07:27 PM
3183     0
Thank you for sharing.