Open pombaer opened 1 year ago
I am suspecting this might be related to https://github.com/ansible/awx/issues/13973 ping @john-westcott-iv
This may be fixed by #13977. @pombaer can you try the import with a modified version of awxkit per #13977 and let us know if it indeed fixed by that?
I will test it, and let you know.
I install latest awxkit (22.2.0) on the Node where AWX is installed. operator verison is "2.1.0" and installed "awx.awx" from awx galaxy where the ansible-playbook is run, version "22.2.0". The error is the same. :(
I have opend a second issue: https://github.com/ansible/awx/issues/13996, I downgraded awx.awx collection and awxkit to 21.13.0 and everythin works as expected, also in this ticket, may ther is a newer version that works also, but something changed in newer versions breaking things.
@pombaer My apologies for the confusion. This fix is not yet released. You would either need to use the devel version of AWX or manually modify the awxkit code like the above mentioned PR in order to test this. Also, as an FYI, these two issues are really the same because awx.awx.import
just uses the awxkit library to perform the import. The issue is inside of the awxkit library as of the constructed inventory feature which is why it works in older versions of AWX.
The fixes mentioned above have been released today with AWX. Please try with the new version and let us know if its working now.
Please confirm the following
Bug Summary
I am using "awx.awx.import" like:
To import the following yaml:
The code workd if there is already an "Source" definition on the inventory, if the inventory does not contain an "Source" definition yet the following error occurs:
AWX version
22.1.0
Select the relevant components
Installation method
kubernetes
Modifications
no
Ansible version
ansible [core 2.14.5]
Operating system
Debian 11.4
Web browser
No response
Steps to reproduce
Create a Inventory without a Source definition and try to import a inventory_source definition using "awx.awx.import", this should end in an error, after that manually create a Source definition for the inventory and try to import the same inventory_source definition , this time it should work.
The Object can be exported with "awx.awx.export".
Expected results
The inventory_source definition should be created and synchronized.
Actual results
Error is :
msg: |- /api/v2/inventory_sources/ "source inv: ansible-staging": Bad Request (400) received - {'inventory': ['This field cannot be blank.']}.
Additional information
No response