Piotr,

Before I consider this solved, let me push the envelope a bit, and ask 
about the switch.  If I run the play like this:

Shell: /scripts/myscript

it works.

If I run it like this:

Shell: /scripts/myscript -f

it fails with:

fatal: [admin1]: FAILED! => {"changed": true, "cmd": "/scripts/dnscopy.pl 
-f", "delta": "0:00:02.025735", "end": "2018-12-04 09:34:11.123312", 
"failed": true, "rc": 2, "start": "2018-12-04 09:34:09.097577", "stderr": 
"Can't exec \"rndc\": No such file or directory at /scripts/dnscopy.pl line 
296.\nrndc -s dns1 reload failed: No such file or directory at 
/scripts/dnscopy.pl line 296.", "stderr_lines": ["Can't exec \"rndc\": No 
such file or directory at /scripts/dnscopy.pl line 296.", "rndc -s dns1 
reload failed: No such file or directory at /scripts/dnscopy.pl line 
296."], "stdout": "", "stdout_lines": []}

Your continued help (or anybody else's) would be appreciated.

Dimitri

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/80b52372-5c47-4f8b-927f-9e9ffafaedcc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to