fanvalt [25.05.2016 14:10]:
> What shall I try ?
> I don't understand how to add in the environment th eexecution of the
> .profile on the remote server ?
> I am a newby with ansible, I have not a clue to do so.
You can write a shell script that consists of
- the setting of the environment variable
- the desired action
For example, this script can contain three lines:
#!/bin/ksh
. /root/.profile
/usr/local/bin/dispatcher.sh
You call this script instead of dispatcher.sh directly, like
- name: Demarrage du server openhr
shell: /bin/ksh /usr/local/bin/mynewscript.sh
Of course you should adapt all file names and paths according to your
system :)
HTH,
Werner
--