On 28.02.2017 20:54, [email protected] wrote:
On Tuesday, February 28, 2017 at 11:33:02 AM UTC-5, Kai Stian Olstad wrote:

With shell module you would not get the users environment, so you
probably missing correct PATH and/or other environment variables need
for starting.

Is there anyway to get the user's env?


It depends somewhat on you setup.

You could use environment in Ansible
https://docs.ansible.com/ansible/playbooks_environment.html

If the environment is in a file, you could source it if you use the shell module. The shell module uses /bin/sh in Ansible so this might not be straightforward.

You could make a startup script that contained all you would need to start the program.

The best option is probably to create init file and start them as a service.

--
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/27b1de4d72003557f985b4ccc6aeba22%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to