# AWX Callback URL

**URL:** <https://forum.ansible.com/t/awx-callback-url/36428>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [March 11, 2022, 5:06pm UTC](https://forum.ansible.com/t/awx-callback-url/36428 "2022-03-11T17:06:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_Garvey](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Garvey](https://forum.ansible.com/u/Brian_Garvey)\
**Post date:** [March 11, 2022, 5:06pm UTC](https://forum.ansible.com/t/awx-callback-url/36428/1 "2022-03-11T17:06:13Z")

</div>

I have a template that is linked to a playbook. Within this playbook I have two plays 1 is targeting localhost and the other is targeting a subset of machines lets just say they are all web servers.

When I am triggering my callback i am passing the X\_REMOTE\_HOST in order to target a specific web server. However this causing the localhost play to get skipped.

Is there any way to allow the localhost + the specific machine to be called as part of the callback? Or is there another option that I could try

---

<div class="post-metadata">

**Author:** ![jowestco](https://avatars.discourse-cdn.com/v4/letter/j/85f322/32.png) [@jowestco](https://forum.ansible.com/u/jowestco)\
**Post date:** [March 16, 2022, 7:47pm UTC](https://forum.ansible.com/t/awx-callback-url/36428/2 "2022-03-16T19:47:35Z")

</div>

When calling a callback url with X\_REMOTE\_HOST we are effectively setting a limit on the job template to include only those machines.  
When ansible encounters this it chooses to skip the localhost play because its hosts do not match the limit imposed by X\_REMOTE\_HOST.  
You should be able to get around this by changing your localhost play to run on “hosts: all” and then adding the following declarations to all of the tasks in the localhost play:  
run\_once: True  
delegate\_to: localhost  
connection: local

That should trick ansible into running the first play but all of the tasks will only run on localhost.

-John
