Thanks, Kai.
Now, I'm completely turned around.
In order for /scripts/dnscopy.pl -f to work in the remote host itself, I
must su - root first. I thought that become: yes took care of that.
Here's the playbook as it stands (and fails) now:
---
- hosts: all
gather_facts: false
become: yes
tasks:
- shell: /scripts/dnscopy.pl -f
register: script_output
- debug:
var: script_output.stdout_lines
Continued help very much apprecuated.
On Monday, December 3, 2018 at 11:44:08 AM UTC-5, Dimitri Yioulos wrote:
>
> Hey, all.
>
> I need to run a script residing on the remote machine with a switch, as in
> "/scripts/myscript -f" (it must be executed by root). I'm using the shell
> module, but can find no way to add the switch without the play failing.
> Help would be appreciated.
>
> Dimitri
>
--
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/b2d59db6-b418-4c8a-b69c-f83240fa2d4b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.