# Provisioning Callbacks "No matching hosts found" issue

**URL:** <https://forum.ansible.com/t/provisioning-callbacks-no-matching-hosts-found-issue/35308>\
**Category:** AWX Project\
**Tags:** gcp, aws, awx\
**Created:** [June 8, 2021, 9:30am UTC](https://forum.ansible.com/t/provisioning-callbacks-no-matching-hosts-found-issue/35308 "2021-06-08T09:30:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Som\_Das](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@Som\_Das](https://forum.ansible.com/u/Som_Das)\
**Post date:** [June 8, 2021, 9:30am UTC](https://forum.ansible.com/t/provisioning-callbacks-no-matching-hosts-found-issue/35308/1 "2021-06-08T09:30:13Z")

</div>

Hi Guys,

**let me explain my current infra.**

1. I created a VM in my Local Machine with Ansible & Awx installed and acting as master
2. Using GCP&AWS to spin up slave machines
3. Now when calling “/launch” API directly its working fine.  
eg: “[http://192.168.xxx.xx/api/v2/job\_templates/14/launch/](http://192.168.xxx.xx/api/v2/job_templates/14/launch/)”
4. But when using Provisioning callbacks its showing error  
e.g: [http://192.168.xxx.xx/api/v2/job\_templates/14/callback/](http://192.168.xxx.xx/api/v2/job_templates/14/callback/)

error: “ **No matching hosts could be found** ”

Both GCP & AWS giving the same error and same results

**Note:**

1. The Dynamic inventory is getting updated but when running the callback API, but after that, while running the template it’s giving the above error
2. In the Playbook I am mentioning to execute on localhost like

- hosts: localhost

1. In the dynamic Inventory I also added my Localhost(the local machine)
2. All testing is being done with Postman

**Requirement:**  
I need Cloud slaves to use provisioning callbacks to ask the tower to run a job against itself and configure the servers.

> **(attachments)**
>
> ![callback error.PNG](https://us1.discourse-cdn.com/ansible/original/2X/5/5d887d3fc5aeec4f5872a976145a0a203993a79b.png)

---

<div class="post-metadata">

**Author:** ![Som\_Das](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@Som\_Das](https://forum.ansible.com/u/Som_Das)\
**Post date:** [June 9, 2021, 7:12am UTC](https://forum.ansible.com/t/provisioning-callbacks-no-matching-hosts-found-issue/35308/2 "2021-06-09T07:12:02Z")

</div>

Could anyone please help me o resolve the issue

---

<div class="post-metadata">

**Author:** ![ffirg](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ffirg/32/10029_2.png) [@ffirg](https://forum.ansible.com/u/ffirg)\
**Post date:** [June 9, 2021, 9:56am UTC](https://forum.ansible.com/t/provisioning-callbacks-no-matching-hosts-found-issue/35308/3 "2021-06-09T09:56:33Z")

</div>

The host must exist in the inventory before a callback will work. It must match the host details as well.

---

<div class="post-metadata">

**Author:** ![Som\_Das](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@Som\_Das](https://forum.ansible.com/u/Som_Das)\
**Post date:** [June 10, 2021, 8:49am UTC](https://forum.ansible.com/t/provisioning-callbacks-no-matching-hosts-found-issue/35308/4 "2021-06-10T08:49:32Z")

</div>

Hi All,

Does anybody have any idea n this stucked here for days now

---

<div class="post-metadata">

**Author:** ![Wei-Yen\_Tan](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/wei-yen_tan/32/4111_2.png) [@Wei-Yen\_Tan](https://forum.ansible.com/u/Wei-Yen_Tan)\
**Post date:** [June 11, 2021, 5:10am UTC](https://forum.ansible.com/t/provisioning-callbacks-no-matching-hosts-found-issue/35308/5 "2021-06-11T05:10:30Z")

</div>

I think what is happening is that the updated inventory (from your current job run)  
is not being recognised. See if you can update the inventory source AFTER the machine has been created. . . OR use a workflow.
