Import Ansible static inventory from YAML/INI
Create a new static (manual) Ansible inventory by parsing YAML or INI content.
Org is the organisation identifier.
t7Project is the project identifier.
0n6Account is the internal customer account ID.
uokRaw inventory content as a string (paste or client-read file).
daSource format of the content.
iniPossible values: The identifier of the new inventory.
4Display name of the new inventory.
e6sOptional tags to apply to the new inventory.
["Recusandae facere nemo.","Provident earum aut.","Voluptas voluptatem commodi.","Illo dolore accusamus voluptas et."]Created response.
Warnings surfaced during import (lossy conversions, flattened groups, etc.).
["Tenetur eius esse consequatur est.","Et itaque ratione.","Reiciendis molestiae molestias."]BadRequestError: Bad Request response.
UnauthorizedError: Unauthorized response.
ForbiddenError: Forbidden response.
NotFoundError: Not Found response.
TimeoutError: Request Timeout response.
ConflictError: Conflict response.
LockedError: Locked response.
ContextCancelledError: response.
InternalServerError: Internal Server Error response.
BadGatewayError: Bad Gateway response.
POST /api/orgs/{org}/projects/{project}/ansible/inventory/import HTTP/1.1
Host: localhost:80
Harness-Account: uok
Content-Type: application/json
Accept: */*
Content-Length: 180
{
"content": "93c",
"format": "ini",
"identifier": "0y",
"name": "i",
"tags": [
"Eos deserunt reprehenderit neque.",
"Doloribus numquam qui sit.",
"Facere odit beatae ullam delectus tenetur."
]
}{
"inventory": {
"account": "zd",
"created": 1627590400,
"description": "Production infrastructure inventory",
"identifier": "test_inventory",
"name": "test inventory",
"org": "2w0",
"project": "u",
"tags": [
"Molestias autem cum sint.",
"Eum omnis."
],
"type": "remote",
"updated": 1627686800
},
"warnings": [
"Nisi ea eius sunt facilis similique.",
"Adipisci omnis labore voluptatem autem et.",
"Sapiente distinctio nostrum nostrum vero."
]
}Last updated
Was this helpful?