the script dispatcher.sh is in the directory where start.sh is launched.
I understand your meaning but it is hard to modify scripts that are
downloaded from a package and I do not own.
because chdir is supposed to change directory before running a script, it
should find all files from that directory when running the script.
Le mardi 24 mai 2016 16:50:25 UTC+2, Kai Stian Olstad a écrit :
>
> On 24. mai 2016 15:23, fanvalt wrote:
> > Hello,
> >
> > Here is my issue.
> > I have a script start.sh with the following lines:
> > #!/bin/ksh
> > dispatcher.sh --command=start --directory=..
> > returnCode=$?
> > exit $returnCode
> >
> > the both scripts are in the same directory, with the 755 rights.
> >
> > I run the task this way:
> > - name: Start
> > shell: /bin/ksh start.sh
> > args:
> > chdir: "/{{ rep_user }}/{{ openhrname }}/bin"
> > register: start_op
> >
> > and I receive the following error:
> > fatal: [integ]: FAILED! => {"changed": true, "cmd": "/bin/ksh start.sh",
> > "delta": "0:00:00.007132", "end": "2016-05-24 15:13:36.666862",
> "failed":
> > true, "rc": 127, "start": "2016-05-24 15:13:36.659730", "stderr":
> > "start_openhr.sh[2]: dispatcher.sh: not found [No such file or
> directory]",
> > "stdout": "", "stdout_lines": [], "warnings": []}
>
> The error message says, start_openhr.sh can't find dispatcher.sh.
> So dispatcher.sh is not in path or you should use absolute path.
>
>
> --
> Kai Stian Olstad
>
--
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/a305cfcf-82f1-44a7-9c3f-1c26c94d50cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.