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

Issue with AWX Callback and Host Matching Error #15166

Open
4 of 11 tasks
analissec opened this issue May 2, 2024 · 1 comment
Open
4 of 11 tasks

Issue with AWX Callback and Host Matching Error #15166

analissec opened this issue May 2, 2024 · 1 comment

Comments

@analissec
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 security@ansible.com instead.)

Bug Summary

I'm encountering a problem with the AWX callback command and host matching. When I run the Ansible callback command:
/usr/bin/curl -k --data "host_config_key=test-ansible-host" https://[AWX_SERVER]/api/v2/job_templates/1527/callback/

I receive the following response:
{"msg":"No matching host could be found!"}

Here's some additional context:

  • I've followed the documentation to integrate my Satellite hosts with AWX, and they are successfully picked up by the dynamic inventory.
  • However, when running the callback command, only an inventory sync is triggered, and then I encounter the "no matching hosts" error, despite my host being present in the inventory.
  • I've configured REMOTE_HOST_HEADERS = ['HTTP_X_FORWARDED_FOR', 'REMOTE_ADDR', 'REMOTE_HOST'] in my AWX configuration.
  • Interestingly, when I manually run the playbook from AWX on the same host I'm trying to use the callback on, it works without any issues.

Any insights or assistance on resolving this issue would be greatly appreciated!

AWX version

22.3.0

Select the relevant components

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

Installation method

N/A

Modifications

no

Ansible version

No response

Operating system

No response

Web browser

No response

Steps to reproduce

  • Ensure that AWX is properly configured and running.
  • Integrate Satellite hosts with AWX using the documentation.
  • Verify that the Satellite hosts are successfully picked up by the dynamic inventory in AWX.
  • Execute the Ansible callback command as mentioned above, substituting [AWX_SERVER] with your AWX server's URL and the job template callback URL.

Expected results

Upon running the Ansible callback command, the system should successfully identify and match the host in the AWX dynamic inventory. The command should then trigger the specified job template on the identified host without encountering any errors. Additionally, the callback should execute any associated tasks or actions as intended.

Actual results

Upon running the Ansible callback command, the system fails to identify and match the host specified in the AWX dynamic inventory. Instead, it returns an error message stating "No matching host could be found!" despite the host being present in the inventory.

Additional information

No response

@thedoubl3j
Copy link
Member

hey @analissec are you able to reproduce this on the latest version of awx?

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

2 participants