Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot bulk add hosts with multiple variables using api/v2/bulk/host_create #15852

Open
5 of 11 tasks
kasper4165 opened this issue Feb 21, 2025 · 0 comments
Open
5 of 11 tasks

Comments

@kasper4165
Copy link

Please confirm the following

  • I agree to follow this project's code of conduct.
  • I have checked the current issues for duplicates.
  • I understand that AWX is open source software provided for free and that I might not receive a timely response.
  • I am NOT reporting a (potential) security vulnerability. (These should be emailed to [email protected] instead.)

Bug Summary

Hello,

I'm having issues trying to add hosts with multiple variables using Bulk Host Create in API.
As I have to add about 2k of servers with multiple variables it will be good to do it using API rather then putting them manually.

AWX version

24.6.1

Select the relevant components

  • UI
  • UI (tech preview)
  • API
  • Docs
  • Collection
  • CLI
  • Other

Installation method

kubernetes

Modifications

no

Ansible version

No response

Operating system

Rocky Linux 9

Web browser

No response

Steps to reproduce

On /api/v2/bulk/host_create/ in CONTENT:

{
"inventory": ,
"hosts": [
{
"name": "<HOSTNAME",
"variables": {
"ansible_host": "<IP_ADDRESS>",
"region": ""
}
}
]
}

Expected results

Host added to AWX Inventory

Actual results

{
"hosts": {
"0": {
"variables": [
"Not a valid string."
]
}
}
}

Additional information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant