# run local\_action only once

**URL:** <https://forum.ansible.com/t/run-local-action-only-once/13908>\
**Category:** Ansible Project\
**Created:** [November 14, 2013, 4:55pm UTC](https://forum.ansible.com/t/run-local-action-only-once/13908 "2013-11-14T16:55:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Heret1qu3](https://avatars.discourse-cdn.com/v4/letter/h/8dc957/32.png) [@Heret1qu3](https://forum.ansible.com/u/Heret1qu3)\
**Post date:** [November 14, 2013, 4:55pm UTC](https://forum.ansible.com/t/run-local-action-only-once/13908/1 "2013-11-14T16:55:08Z")

</div>

Hello, my playbook gathering all hosts which was changed in file while playbook plays  
After playbook finished I should send in to email, but can’t understand how.  
handlers sends alot emails with this attach file, same with post\_tasks.  
Any hints how to execute in only once?  
Thanks.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [November 15, 2013, 5:30pm UTC](https://forum.ansible.com/t/run-local-action-only-once/13908/2 "2013-11-15T17:30:48Z")

</div>

Have a play that only targets localhost at the end of your playbook.

– Michael
