OK thank you but this set the environment variable on the server where the playbook is run, I need the environment variables set on the target server whe running shells because the .profile is not run when connected with ssh. So I cannot use your bypass solution
Le mercredi 25 mai 2016 15:06:40 UTC+2, Johannes Kastl a écrit : > > On 25.05.16 14:10 fanvalt wrote: > > What shall I try ? > > I don't understand how to add in the environment th eexecution of the > > .profile on the remote server ? > > I would set the variables, that your .profile contains, in the > environment section, something like this (untested): > > - hosts: all > remote_user: root > tasks: > - name: Demarrage du server openhr > shell: /bin/ksh dispatcher.sh > environment: > JAVA_HOME: /usr/bin/foobar/ > > > I am a newby with ansible, I have not a clue to do so. > > I also have never set the environment with ansible, so we're both > newbies... > > Johannes > > -- 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/8e971f13-bce4-4789-aa35-d236792bb584%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
