Why is tower-manage inventory_import failing with an IntegrityError when run from Ansible Tower?
Issue
When attempting to update the Ansible Tower inventory using tower-manage inventory_import from a playbook in Tower, you may get output similar to the following:
IntegrityError: update or delete on table \\"main_host\\" violates foreign key constraint \\"main_jobevent_host_id_76cda52c42702dfc_fk_main_host_id\\" on table \\"main_jobevent\\"", "DETAIL: Key (id)=(1778) is still referenced from table \\"main_jobevent\\"."], "stdout": "", "stdout_lines": []}
- NOTE: the
tower-manageutility was once calledawx-manage, then changed totower-manageand is now calledawx-manageagain. These terms should be considered synonymous on this page
Environment
- Red Hat Ansible Tower
- 3.2.1
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
