"No matching host could be found!" - All host are connect to one ssh server with different port

SUMMARY

If I ask to AWX server to PROVISIONING CALLBACK by host1 with curl (curl -vv --data “host_config_key=aec14601575ea619a149ec1d59b72686” http://IP_address:80/api/v2/job_templates/8/callback/), I get

  • {“msg”:“No matching host could be found!”}
STEPS TO REPRODUCE

Our infrastructure:

host1 (with real IP 195.250.143.180) ; host2 ; host3 are connected to ssh server “my.sshserver.com”(same but with different port). AWX run on different server.

Every host has setup:

If I ask to AWX server to PROVISIONING CALLBACK by host1 with curl (curl -vv --data “host_config_key=aec14601575ea619a149ec1d59b72686” http://IP_ADDRESS:80/api/v2/job_templates/8/callback/), I get

  • {“msg”:“No matching host could be found!”}

In awx logs is task with IP address of host1 (for example 35.204.175.71, but I need same.hostforevery.com:30001)

If I run curl on ssh server (same.hostforevery.com), I get:

  • {“msg”:“Multiple hosts matched the request!”}

I also tried:
curl -v -H “REMOTE_ADDR: my.sshserver.com:10020” -H “REMOTE_HOST: host1” --data “host_config_key=aec14601575ea619a149ec1d59b72686” http://admin:password@IP_ADDRESS:80/api/v2/job_templates/8/callback/

But AWX still get request from real host IP 195.250.143.180, but to resolve it I should have my.sshserver.com:30001

EXPECTED RESULTS

I need somehow add in to curl or to different way to say awx server that host1 is on address same.hostforevery.com:30001. Playbook should by run on host1.

ACTUAL RESULTS
  • {“msg”:“No matching host could be found!”}

Hi,

Can you check if your playbook has hosts: all or it’s pointing to a specific host or group?

Regards,
Sergio

In my playbook I have only one host like:

  • hosts: host1