I have recently set up RHEL Satellite and I'm now integrating with our AWX/Ansible Tower implementation. The curl request I'm using is as follows:
/usr/bin/curl -k -s --data "host_config_key={REDACTED}" https://awx.fqdn.com/api/v2/job_templates/34/callback/
This appears to (correctly) kick off an inventory sync (and the host is in the Satellite inventory), yet the AWX server returns {"msg":"No matching host could be found!"}
The documentation I have found is sparse on this topic, but notes that the hostname or IP may be used to determine the host in inventory.
The hostname returned by hostnamectl is the FQDN of the host (which matches the hostname in inventory exactly), but I've also tried setting it to the short name with the same results.
I found an rDNS issue yesterday but sorted it out so now the IP resolves correctly to the inventory hostname as well.
How does AWX determine the hostname to use? Are there any logs I can refer to?
EDIT: I should also add I've tried a GET request with an admin username/password and the array of matching_hosts is empty.
curl http://admin:[email protected]/api/v2/job_templates/34/callback/
{"host_config_key":"{REDACTED}","matching_hosts":[]}