# Execute one email/command per play, no matter how many servers

**URL:** <https://forum.ansible.com/t/execute-one-email-command-per-play-no-matter-how-many-servers/25665>\
**Category:** Ansible Project\
**Created:** [October 2, 2017, 9:42pm UTC](https://forum.ansible.com/t/execute-one-email-command-per-play-no-matter-how-many-servers/25665 "2017-10-02T21:42:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Harmon](https://avatars.discourse-cdn.com/v4/letter/j/edb3f5/32.png) [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Post date:** [October 2, 2017, 9:42pm UTC](https://forum.ansible.com/t/execute-one-email-command-per-play-no-matter-how-many-servers/25665/1 "2017-10-02T21:42:05Z")

</div>

I have a play that is setup to email me once complete with some of the results…the problem is that I get an email for every server I run the play against. For instance, against 1 server I get 1 email. Against 3 servers I receive 3 identical emails.

How can I get a particular task to just execute once at the end of a play no matter how many servers I am running the play against?

---

<div class="post-metadata">

**Author:** ![John\_Harmon](https://avatars.discourse-cdn.com/v4/letter/j/edb3f5/32.png) [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Post date:** [October 2, 2017, 9:48pm UTC](https://forum.ansible.com/t/execute-one-email-command-per-play-no-matter-how-many-servers/25665/2 "2017-10-02T21:48:19Z")

</div>

Answered it myself.

run\_once: true
