On Nov 2, 2017 6:22 AM, "Tejas Gadaria" <refond.g...@gmail.com> wrote:

Hello All,

I have a shell script say 'test1.sh', roughly looks like this,
I am trying to execute script with ansible, which throws "No such file or
directory" error for "source ../Properties/Main.sh"
However, the script is working fine is I am NOT using ansible.

#/bin/bash

Make sure the shebang line is correct in your actual script.  This mockup
lacks the "!"

Potentially important if the Shell invoked by ansible does not implement
"source". (I believe that "." is managed by posix but source is not.)



# Few Commands

source ../Properties/Main.sh


Source is a shell built-in.  So options are that the Shell this is being
run by does not implement it or that the problem is that Main.sh isn't
being found.  Make sure that the file is present on the remote host and
then try an absolute path (as ansible may be running from a different
working directory than you are anticipating)

-Toshio

#
#Remaining Part of the Script

I belive execution is failing because, 'source' Command is not executable.
How should I solve this ? Any help will be appreciated.!

Thanks,
Tejas

-- 
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ansible-devel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to