OK, and thanks, as always for your input/insight. I figured that when I
first used the script module, and it "failed". That's when I turned to
local_action. Still, I think that the documentation could be a bit more
clear.
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/359f4e5a-3a4e-401e-bbb1-ea9ddce467cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.