Thanks, Kai.  So, am i misinterpreting this line from the documentation?:

   - This module does not require python on the remote system, much like 
   the raw 
   <https://docs.ansible.com/ansible/2.7/modules/raw_module.html#raw-module>
    module.

That seems to mean (to me, at least) just what is says, that there's no 
need for python to be installed on the Windows systems in which the script 
is being executed.

On Wednesday, November 21, 2018 at 10:19:44 AM UTC-5, Dimitri Yioulos wrote:
>
> Hello, all.
>
> We have an occasional need to update a particular piece of a core business 
> application across a number of Windows servers.  The process involves a 
> number of steps, most done via the application UI.  It's tedious and time 
> consuming so, of course, I've created a python script to do the actual 
> update (fortunately, the update process can be done from the command line, 
> albeit via a number of steps), and a playbook to execute it.  Here's the 
> playbook:
>
> ---
>> - hosts: all
>>   gather_facts: false
>>   any_errors_fatal: true
>>   tasks:
>>      - name: reload DAO
>>        local_action: script /etc/ansible/files/DAO_update.py {{ 
>> inventory_hostname }}
>>        register: dao_output
>>      - debug: var=dao_output.stdout_lines
>
>
> Note the use of local_action.  When I tried to simply use the script 
> module (script: /etc/ansible/files/DAO_update.py {{ inventory_hostname }}), 
> I got no errors, but the script didn't execute.  I determined this by 
> running tcpdump, which returned no output.  If I ran the script manually, 
> tcpdump returned expected output.  However, If I ran the playbook with 
> local_action (as above), tcpdump returned the expected output; e.g. the 
> script executed properly.  Why did using the script module not work?  
> According to the script module documentation, among other things, python 
> isn't required to be installed on the target.  An explanation would be 
> appreciated.
>

-- 
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/3c2059f5-783f-402e-9d13-f915a17ed2e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to