Dimitri
Your script is depending on rndc residing in the host's $PATH. It might
happen, that the root's profile is being set differently when you become
root in Ansible playbook, than the situation when are switching to root in
a regular way in SSH or terminal. This is why I asked you for more
information in my previous post.
A possible workaround would be to forcibly set PATH env variable when
calling dnscopy.pl. but I can't give you a ready recipe because I don't
have enough informaton about your system

Piotr



wt., 4 gru 2018 o 21:07 Dimitri Yioulos <[email protected]> napisaƂ(a):

> Piotr,
>
> The thing of it is, the script (which I didn't write) runs the rndc (BIND
> Remote Name Daemon Control - we use it to reload zone files) command on our
> dns servers (which it locates), not on the host in which the script is
> located. Thus, the failure. Here's a snippet from the script:
>
>     # rndc -s dns1 reload
>>     @args = ("rndc", "-s", "dns1", "reload");
>>     system(@args) == 0
>>         or die "rndc -s dns1 reload failed: $!";
>
>
> Changes to the script are not an option.
>
> That said, is what I'm trying to do not doable?
>
> 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/0e8146dc-6e84-41de-995e-235daf16f513%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/0e8146dc-6e84-41de-995e-235daf16f513%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CACHJvyOJMeVr%2BWg4ONow2OnN%2BH6hatJCO9k9SRov5pyyjZuLfQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to