On Saturday, 15 December 2018 15:33:57 CET Ankit Vashistha wrote: > I tried the following modified playbook: > > *- hosts: Windows* > * gather_facts: false* > * tasks:* > * - name: Ensure Service status is running and startup mode set to > Automatic* > * win_service:* > * name: MSSQLSERVER* > * state: started* > * start_mode: auto* > > > * - name: Send Job completion notification to MS Teams* > * script: /tmp/ansible_scripts/MSTeamsNotifications.pyc* > * args:* > * executable: /usr/bin/python* > * delegate_to: 127.0.0.1*
Recommend using localhost and not 127.0.0.1, localhost is special in Ansible and does the right ting. The script module copies the file to the remote host and execute the script, so in this case you should use the command module instead and just run the script/program since it's already on the Ansible controller. -- 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/3163121.aUfRBxzhWJ%40x1. For more options, visit https://groups.google.com/d/optout.
