I have one more query though. What is the exact different between local_action* and delegate_to ?* *Thanks and Regards,*
*Ankit Kumar Sharma **Mobile +91-9717144596* On Sat, Dec 15, 2018 at 5:53 PM Kai Stian Olstad < [email protected]> wrote: > On Saturday, 15 December 2018 13:18:49 CET Ankit Vashistha wrote: > > I have got the following playbook: > > > > --- > > - hosts: Windows > > > > tasks: > > - name: Ensure Service status is running and startup mode set to > > Automatic > > win_service: > > name: MSSQLSERVER > > state: started > > start_mode: auto > > ... > > > > I want to run a Python script on the *localhost* i.e., the machine which > > runs Ansible which sends Notification alert to MS Team chat window. How > can > > i modify the above playbook in such a way that once the task is > completed, > > the python script present in */home/myscript/msnotification.py *in > > *localhost* is executed. > > Add delegate_to: localhost on the task(s) you need to run on localhost > and not the remote host. > > -- > Kai Stian Olstad > > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/2744585.4kni9uFpsz%40x1. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CACecUhvJG1%2Bh1vSMkXgLQMuenAq74tZoYG%3Dh4GzjrVnL4D7TXA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
