Thanks Kai

Is there anyway to get the user's env?

On Tuesday, February 28, 2017 at 11:33:02 AM UTC-5, Kai Stian Olstad wrote:
>
> On 28. feb. 2017 15:38, [email protected] <javascript:> 
> wrote: 
> > I would assume ansible would run a bash script exactly as if it were run 
> > from the CLI, but apparently not.  Can any one help me understand the 
> > differences? 
> > 
> > I am using ansible shell to start a set of five long running processes. 
> > Each process is a bash script that starts a java program. Each script is 
> > set up with an & so the process runs in the background.  To wit: 
> > 
> > shell: ./start.sh & 
> > 
> > All process work as expected when started manually by logging in to the 
> > hosts one by one and running the exact same command that would be run 
> using 
> > shell.  Three of the processes do indeed work when started from ansible 
> > shell, but two fail to start at all.  These two have something in 
> common: 
> > Both use maven exec:exec to start them.   The others do not. 
> > 
> > Is there any reason for this? 
>
> With shell module you would not get the users environment, so you 
> probably missing correct PATH and/or other environment variables need 
> for starting. 
>
> -- 
> 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/a5c7189a-2130-492b-8a02-3f0eb6152087%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to