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

16 views
Skip to first unread message

John Harmon

unread,
Oct 2, 2017, 5:42:05 PM10/2/17
to Ansible Project
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?

John Harmon

unread,
Oct 2, 2017, 5:48:19 PM10/2/17
to Ansible Project
Answered it myself. 

run_once: true
Reply all
Reply to author
Forward
0 new messages